Figure 1. cmp
Description
The contents of register rA are subtracted from the contents of register rB and the result is placed into register rD.
The MSB bit of rD is adjusted to shown true relation between rA and rB. If the U bit is set, rA and rB is considered unsigned values. If the U bit is clear, rA and rB is considered signed values.
Pseudocode
(rD) ← (rB) + (rA) + 1
(rD)(MSB) ← (rA) > (rB)
Registers Altered
- rD
Latency
1 cycle