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>

相关推荐
C++ 老炮儿的技术栈10 小时前
GCC编译时无法向/tmp 目录写入临时汇编文件,因为设备空间不足,解决
linux·运维·开发语言·汇编·c++·git·qt
cch891815 小时前
Java vs 汇编:高级与低级的终极对决
java·开发语言·汇编
2301_7890156215 小时前
C++:智能指针
c语言·开发语言·汇编·c++·智能指针
独小乐2 天前
007.GNU C内联汇编杂谈|千篇笔记实现嵌入式全栈/裸机篇
linux·c语言·汇编·单片机·嵌入式硬件·arm·gnu
Lzh编程小栈5 天前
数据结构与算法之队列深度解析:循环队列+C 语言硬核实现 + 面试考点全梳理
c语言·开发语言·汇编·数据结构·后端·算法·面试
cch89186 天前
汇编与C语言:底层对话VS高效指挥
c语言·开发语言·汇编
jwn9996 天前
PHP vs 汇编:编程语言的两极对决
开发语言·汇编·php
cch89186 天前
汇编vs易语言:底层与中文编程终极对决
汇编
cch89187 天前
汇编VS高级语言:从硬件操控到高效开发
汇编
cch89187 天前
汇编与Java:底层与高层的编程对决
java·开发语言·汇编