ARM - data processing - comparison

Index : Data Processing


Ref: https://embedded2016.hackpad.com/ARM-Architecture-z5hdXADIEm2


  • Comparison operations:
只設定在CPSR的 condition code bits(N, Z, C and V)
  • CMP : compare
  • CMN : compare negated
  • TST : (bit) test
  • TEQ : test equal
  • CMP    r1, r2        ; set CC on r1 - r2
  • CMN    r1, r2        ; set CC on r1 + r2
  • TST    r1, r2        ; set CC on r1 and r2
  • TEQ    r1, r2        ; set CC on r1 xor r2
  • 這裡的CC代表CPSR的 condition code bits

---


留言

熱門文章