淡泊明志 宁静致远
分类: LINUX
2007-12-08 11:40:42
ARM 汇编指令条件执行详解
【本文主要内容来源于S3C2410X用户手册】
ALU状态标志
CPSR寄存器包含下面的ALU状态标志:
The CPSR contains the following ALU status flag:
N Set when the result of the operation
was Negative.
Z Set when the result of the
operation was Zeto.
C Set when the operation resulted
in a Carry.
V Set when the operation caused
Overflow.
Q ARM architecture v5E only.
执行条件
N,Z,C,V相关的条件码后缀如下表所列:
Condition Code Summary
Code Suffix
Flags
Meaning
0000 EQ Z set
equal
(= =)
0001 NE Z clear
not equal
(! =)
0010 CS/HS C set
unsigned higher or same (>=) unsigned
0011 CC/LO C clear
unsigned
lower (<) unsigned
0100 MI N set
negative
0101 PL N clear
positive or zero
0110 VS V set
overflow
0111 VC V clear
no overflow
1000 HI C set and Z clear unsigned
higher (>) unsigned
1001 LS C clear or Z set unsigned
lower or same (<=) unsigned
1010 GE N equals V
greater or
equal (>=) signed
1011 LT N not equal to V less
than
(<) signed
1100 GT Z clear & (N ==V) greater than
(>) signed
1101 LE Z set | (N != V) less
than or equal (<=) signed
1110