Rev. 1.50, 10/04, page 227 of 448
temp=R[n]^R[m];
HH = (temp & 0xFF000000) >> 24;
HL = (temp & 0x00FF0000) >> 16;
LH = (temp & 0x0000FF00) >> 8;
LL = temp & 0x000000FF;
HH = HH && HL && LH && LL;
if (HH==0) T = 1;
else T = 0;
PC += 2;
}
CMPIM(long i) /* CMP_EQ #imm,R0 */
{
long imm;
if ((i&0x80)==0) imm=(0x000000FF & (long i));
else imm=(0xFFFFFF00 | (long i));
if (R[0]==imm) T = 1;
else T = 0;
PC += 2;
}
Example:
CMP/GE R0,R1
;
R0 = H'7FFFFFFF, R1 = H'80000000
BT TRGET_T
;
T = 0, so branch is not taken.
CMP/HS R0,R1
;
R0 = H'7FFFFFFF, R1 = H'80000000
BT TRGET_T
;
T = 1, so branch is taken.
CMP/STR R2,R3
;
R2 = "ABCD", R3 = "XYCZ"
BT TRGET_T
;
T = 1, so branch is taken.
Summary of Contents for SuperH SH-4A
Page 2: ...Rev 1 50 10 04 page ii of xx ...
Page 8: ...Rev 1 50 10 04 page viii of xx ...
Page 116: ...Rev 1 50 10 04 page 96 of 448 ...
Page 178: ...Rev 1 50 10 04 page 158 of 448 ...
Page 206: ...Rev 1 50 10 04 page 186 of 448 ...
Page 231: ...Rev 1 50 10 04 page 211 of 448 Possible Exceptions Slot illegal instruction exception ...
Page 235: ...Rev 1 50 10 04 page 215 of 448 Possible Exceptions Slot illegal instruction exception ...
Page 238: ...Rev 1 50 10 04 page 218 of 448 Possible Exceptions Slot illegal instruction exception ...
Page 408: ...Rev 1 50 10 04 page 388 of 448 Possible Exceptions Inexact Not generated when FPSCR PR 1 ...
Page 446: ...Rev 1 50 10 04 page 426 of 448 ...
Page 468: ...Rev 1 50 10 04 page 448 of 448 ...
Page 471: ......
Page 472: ...SH 4A Software Manual ...