ARM base instruction -- b.cs

B

Branch causes an unconditional branch to a label at a PC-relative offset, with a hint that this is not a subroutine call or return.

在PC相对偏移处对标签进行无条件分支,并提示这不是子程序调用或返回。

操作码 助记符 标志 含义

0x2 0010 CS/HS C = 1 无符号数大于或等于

402c88: f9401fe2 ldr x2, [sp, #56] // x2="%s/%d/task/%d/stat"

402c8c: 2a1c03e5 mov w5, w28 // w5=w28=tid

402c90: f94047e1 ldr x1, [sp, #136] // x1=len

402c94: 2a1303e4 mov w4, w19 // w4=w19=pid

402c98: aa1a03e3 mov x3, x26 // x3=x26="/proc"

402c9c: 97fffb91 bl 401ae0 <snprintf@plt>

int nbytes = snprintf(path, len, "%s/%d/task/%d/stat", "/proc", pid, tid);

402ca0: b94013e1 ldr w1, [sp, #16] // w1 = len

402ca4: 6b01001f cmp w0, w1 // w0 = nbytes

402ca8: 54000a02 b.cs 402de8 <ferror@plt+0xf08> // b.hs, b.nlast

if (nbytes < 0 || nbytes >= len)

perror("get_threadname: snprintf");

相关推荐
xiaozhiwise6 小时前
ARM base instruction -- ccmp (immediate)
汇编
zzj_2626102 天前
masm汇编字符串输出演示
汇编
xiaozhiwise3 天前
ARM base instruction -- cls
汇编
R6bandito_4 天前
C/C++常用编译工具链:GCC,Clang
c语言·开发语言·汇编·c++·经验分享·gnu
xiaozhiwise5 天前
ARM base instruction -- cinc
汇编
CYRUS STUDIO5 天前
详解ARM64可执行程序的生成过程
android·c语言·汇编·c++·gdb·arm64
漠北的哈士奇6 天前
32位汇编——通用寄存器
汇编
xiaozhiwise7 天前
ARM base instruction -- bfi
汇编
xiaozhiwise7 天前
ARM base instruction -- adcs
汇编
xiaozhiwise7 天前
ARM base instruction -- adc
汇编