Syntax: CMN {<cond>} {<P>} <operand1>, <operand2>
Operation: Reflect result of operand one - (- operand two)
Flags: N,Z,C,V
CMN is exactly the same as CMP, except that it compares operand one with the negative of operand two.
This instruction allows comparisons to be made with small immediate constants which could not be represented otherwise. The ARM will automatically form the negative of operand two and then make the comparison.
Examples:
CMN R5,R7 ; Compare R5 with -R7
CMN R6,#1 ; Compare R6 with -1
CMN R3,R0,LSL#1 ; Compare R3 with -R0*2
Since the purpose of the CMP instruction is to affect the status flags, the S suffix does not have to be used.
|
|
|