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

相关推荐
lhbian10 小时前
AI编程革命:Codex让脚本开发提速10倍
开发语言·汇编·jvm·c#
wechatbot8882 天前
企业微信全场景消息发送接口开发实现及接口调用
java·汇编·微信·企业微信
wechatbot8882 天前
企业微信 iPad 协议接口全功能开发实战
汇编·人工智能·ios·微信·企业微信·ipad
techdashen3 天前
Rust 1.88 终于稳定了裸函数:写汇编不再需要那堆样板代码
汇编·rust
So_shine4 天前
stm32f103汇编-1:LED点灯
汇编·stm32·单片机·led
北漂Zachary5 天前
四大编程语言终极对决:汇编/C#/Go/Java谁更强
汇编·golang·c#
达帮主6 天前
25.C语言 递归函数
c语言·开发语言·汇编
aq55356008 天前
Laravel2.x:被遗忘的PHP框架遗珠
开发语言·汇编·c#
lhbian8 天前
C# vs 汇编:编程世界的两极对比
开发语言·汇编·c#
zopple8 天前
汇编、C、C++和Java核心技术对比
c语言·汇编·c++