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>

相关推荐
代码改变世界ctw19 小时前
ARM汇编编程(AArch64架构)课程 - 第5章函数调用规范
汇编·arm开发·架构
liulilittle1 天前
C/C++ inline-hook(x86)高级函数内联钩子
c语言·开发语言·汇编·c++·hook·底层·钩子
代码改变世界ctw1 天前
ARM汇编编程(AArch64架构)课程 - 第8章:控制流与循环
汇编·arm开发
Jacen.L1 天前
【汇编逆向系列】九、函数传参之结构体 - SHL、SHR指令,小型结构体参数和返回值
汇编
2401_861615282 天前
跨平台的ARM 和 x86 Docker 镜像:汇编语言实验环境搭建
linux·汇编·ubuntu·docker·容器
大P哥阿豪2 天前
Go defer(二):从汇编的角度理解延迟调用的实现
开发语言·汇编·后端·golang
花小璇学linux2 天前
imx6ull-裸机学习实验1——汇编LED灯实验
linux·汇编·imx6ull·arm裸机开发
无小道3 天前
c++-引用(包括完美转发,移动构造,万能引用)
c语言·开发语言·汇编·c++
liulilittle4 天前
C++ i386/AMD64平台汇编指令对齐长度获取实现
c语言·开发语言·汇编·c++
工业互联网专业4 天前
汇编与接口技术:8259中断实验
汇编·单片机·嵌入式硬件·8259中断实验