MicroBlaze Processor Reference Guide
189
UG081 (v14.7)
Instructions
cmp
Integer Compare
Description
The contents of register rA is 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
cmp
rD, rA, rB
compare rB with rA (signed)
cmpu
rD, rA, rB
compare rB with rA (unsigned)
0 0 0 1 0 1
rD
rA
rB
0 0 0 0 0 0 0 0 0 U 1
0
6
1
1
1
6
2
1
3
1
Содержание MicroBlaze
Страница 1: ...MicroBlaze Processor Reference Guide Embedded Development Kit EDK 14 7 UG081 v14 7...
Страница 4: ...MicroBlaze Processor Reference Guide www xilinx com UG081 v14 7...
Страница 8: ...8 www xilinx com MicroBlaze Processor Reference Guide UG081 v14 7 Chapter 1 Introduction Send Feedback...
Страница 262: ...262 www xilinx com MicroBlaze Processor Reference Guide UG081 v14 7 Send Feedback...