ARM base instruction -- cinc

Conditional Increment returns, in the destination register, the value of the source register incremented by 1 if the condition is TRUE, and otherwise returns the value of the source register.

如果条件为TRUE,则条件增量在目标寄存器中返回源寄存器的值加1,否则返回源寄存器。

32-bit variant

Applies when sf == 0.

CINC <Wd>, <Wn>, <cond>

64-bit variant

Applies when sf == 1.

CINC <Xd>, <Xn>, <cond>

Decode for all variants of this encoding

integer d = UInt(Rd);

integer n = UInt(Rn);

integer datasize = if sf == '1' then 64 else 32;

Operation

bits(datasize) result;

bits(datasize) operand1 = X[n];

if ConditionHolds(cond) then

result = operand1 + 1;

else

result = operand1;

X[d] = result;

404288: 710002ff cmp w23, #0x0 // w23=0

40428c: aa1b03fc mov x28, x27 // x28=x27=walk->next

404290: 110006f7 add w23, w23, #0x1 // w23=w23+1 count++

404294: 1a94069b cinc w27, w20, ne // w27=0, w20=0; if ConditionHolds(cond) then w27=w20+1=1

404298: 17ffffd2 b 4041e0 <ferror@plt+0x2300>

相关推荐
Trouvaille ~3 小时前
【Linux】库制作与原理(三):动态链接与加载机制
linux·c语言·汇编·got·动静态库·动态链接·plt
猫猫的小茶馆4 小时前
【ARM】从零封装STM32标准库
汇编·arm开发·stm32·单片机·嵌入式硬件·架构
切糕师学AI5 小时前
ARM 汇编指令:PUSH 和 POP
汇编·arm开发·assembly
切糕师学AI6 小时前
ARM 汇编指令:ERET
汇编·arm开发
切糕师学AI1 天前
ARM 汇编指令:BX
汇编·arm开发·assembly
切糕师学AI1 天前
ARM 汇编指令:B
汇编·arm开发
Trouvaille ~1 天前
【Linux】库制作与原理(一):静态库与动态库的制作使用
linux·运维·服务器·c语言·汇编·动静态库·编译链接
渡我白衣1 天前
计算机组成原理(9):零拓展与符号拓展
c语言·汇编·人工智能·嵌入式硬件·网络协议·硬件工程·c
CHANG_THE_WORLD2 天前
6.2.在汇编层面,数据本身没有类型
java·服务器·汇编
切糕师学AI2 天前
ARM 汇编指令:TST
汇编·arm开发