I'm having trouble understanding the difference between these two instructions in ARM. From what I understand,
CMP R1, R2
Would perform the action R1-R2, but not store the result. It would then set flags in the status register such as N (negative, if R1
What I don't get is what TST does differently. In my notes it says that TST doesn't change the values of its operands.. but I thought CMP didn't either. How do the two instructions differ?
How is
CMP R1, R2
different to
TST R1, R2
? Thanks in advance for any help!