ARM instruction problem

In the book'"ARM ArchitectureReference Manual", there is a example to describe the difference between CMN and CMP. Is it correct?

===========The book's content====================================== Usage CMN performs a comparison by adding the value of to the value of register , and updates the condition code flags (based on the result). This is almost equivalent to subtracting the negative of the second operand from the first operand, and setting the flags on the result.

The difference is that the flag values generated can differ when the second operand is 0 or 0x80000000. For example, this instruction always leaves the C flag = 1: CMP Rn, #0 while this instruction always leaves the C flag = 0: CMN Rn, #0

Reply to
PoChun.Hsu
Loading thread data ...

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.