Rev. 1.50, 10/04, page 224 of 448
10.1.14 CMP/cond
(Compare
Conditionally): Arithmetic Instruction
Format
Operation
Instruction Code
Cycle
T Bit
CMP/EQ Rm,Rn
If Rn = Rm, 1
→
T
Otherwise, 0
→
T
0011nnnnmmmm0000
1
Result of
comparison
CMP/GE Rm,Rn
If Rn
≥
Rm, signed, 1
→
T
Otherwise, 0
→
T
0011nnnnmmmm0011
1
Result of
comparison
CMP/GT Rm,Rn
If Rn > Rm, signed, 1
→
T
Otherwise, 0
→
T
0011nnnnmmmm0111
1
Result of
comparison
CMP/HI Rm,Rn
If Rn > Rm, unsigned, 1
→
T
Otherwise, 0
→
T
0011nnnnmmmm0110
1
Result of
comparison
CMP/HS Rm,Rn
If Rn
≥
Rm, unsigned, 1
→
T
Otherwise, 0
→
T
0011nnnnmmmm0010
1
Result of
comparison
CMP/PL Rn
If Rn > 0, 1
→
T
Otherwise, 0
→
T
0100nnnn00010101
1
Result of
comparison
CMP/PZ Rn
If Rn
≥
0, 1
→
T
Otherwise, 0
→
T
0100nnnn00010001
1
Result of
comparison
CMP/STR Rm,Rn
If any bytes are equal, 1
→
T
Otherwise, 0
→
T
0010nnnnmmmm1100
1
Result of
comparison
CMP/EQ #imm,R0
If R0 = imm, 1
→
T
Otherwise, 0
→
T
10001000iiiiiiii
1
Result of
comparison
Description:
This instruction compares general registers Rn and Rm, and sets the T bit if the
specified condition (cond) is true. If the condition is false, the T bit is cleared. The contents of Rn
are not changed. Nine conditions can be specified. For the two conditions PZ and PL, Rn is
compared with 0.
With the EQ condition, sign-extended 8-bit immediate data can be compared with R0. The
contents of R0 are not changed.
Содержание SuperH SH-4A
Страница 2: ...Rev 1 50 10 04 page ii of xx ...
Страница 8: ...Rev 1 50 10 04 page viii of xx ...
Страница 116: ...Rev 1 50 10 04 page 96 of 448 ...
Страница 178: ...Rev 1 50 10 04 page 158 of 448 ...
Страница 206: ...Rev 1 50 10 04 page 186 of 448 ...
Страница 231: ...Rev 1 50 10 04 page 211 of 448 Possible Exceptions Slot illegal instruction exception ...
Страница 235: ...Rev 1 50 10 04 page 215 of 448 Possible Exceptions Slot illegal instruction exception ...
Страница 238: ...Rev 1 50 10 04 page 218 of 448 Possible Exceptions Slot illegal instruction exception ...
Страница 408: ...Rev 1 50 10 04 page 388 of 448 Possible Exceptions Inexact Not generated when FPSCR PR 1 ...
Страница 445: ...Rev 1 50 10 04 page 425 of 448 Possible Exceptions Invalid operation Overflow Underflow Inexact ...
Страница 446: ...Rev 1 50 10 04 page 426 of 448 ...
Страница 468: ...Rev 1 50 10 04 page 448 of 448 ...
Страница 471: ......
Страница 472: ...SH 4A Software Manual ...