Rev. 1.50, 10/04, page 232 of 448
R[n] -= tmp2;
tmp1 = (R[n]>tmp0);
switch(Q){
case 0:Q = (unsigned char)(tmp1==0);
break;
case 1:Q = tmp1;
break;
}
break;
}
break;
}
T = (Q==M);
PC += 2;
}
Example 1:
;
R1 (32 bits) ÷ R0 (16 bits) = R1 (16 bits); unsigned
SHLL16 R0
;
Set divisor in upper 16 bits, clear lower 16 bits to 0
TST R0,R0
;
Check for division by zero
BT ZERO_DIV
;
CMP/HS R0,R1
;
Check for overflow
BT OVER_DIV
;
DIV0U
;
Flag initialization
.arepeat
16
;
DIV1 R0,R1
;
Repeat 16 times
.aendr
;
ROTCL R1
;
EXTU.W R1,R1
;
R1 = quotient
Содержание 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 ...