ARM base instruction -- ccmp

Conditional Compare (register) sets the value of the condition flags to the result of the comparison of two registers if the condition is TRUE, and an immediate value otherwise.

条件比较(寄存器)如果条件为真,则将条件标志的值设置为两个寄存器的比较结果,否则设置为立即值。

32-bit variant:

CCMP <Wn>, <Wm>, #<nzcv>, <cond>

64-bit variant:

CCMP <Xn>, <Xm>, #<nzcv>, <cond>

ccmp x13, x12, #0x0, ne # 双重比较. 判断 x13 和 x12 同时存在,即都不等于0。将ne设置到标志寄存器。

4037b8: 1100079c add w28, w28, #0x1 // this->argc+1

4037bc: b900527c str w28, [x19, #80] // this->argc++;

4037c0: 3864cb20 ldrb w0, [x25, w4, sxtw] // w0=0=args[i] cpsr=0x80201000 [ EL=0 SSBS SS N ]

4037c4: 7100001f cmp w0, #0x0 // cpsr=0x60201000 [ EL=0 SSBS SS C Z ]

4037c8: 7a440064 ccmp w3, w4, #0x4, eq // eq = none, w3=0xb=size-1, w4=4=i cpsr=0x20201000 [ EL=0 SSBS SS C ]

4037cc: 54fffecd b.le 4037a4 <ferror@plt+0x18c4>

#<nzcv>:

ARM Process state -- PSTATE

ARM Process state -- CPSR

相关推荐
xiaozhiwise21 小时前
ARM base instruction -- ccmp (immediate)
汇编
zzj_2626103 天前
masm汇编字符串输出演示
汇编
xiaozhiwise4 天前
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
汇编