Rev. 1.50, 10/04, page 234 of 448
Example 4:
;
R2 (32 bits) ÷ R0 (32 bits) = R2 (32 bits); signed
MOV R2,R3
;
ROTCL R3
;
SUBC R1,R1
;
Dividend sign-extended to 64 bits (R1:R2)
XOR R3,R3
;
R3 = 0
SUBC R3,R2
;
If dividend is negative, subtract 1 to convert to one's complement notation
DIV0S R0,R1
;
Flag initialization
.arepeat
32
;
ROTCL R2
;
Repeat 32 times
DIV1 R0,R1
;
.aendr
;
ROTCL R2
;
R2 = quotient (one's complement notation)
ADDC R3,R2
;
If MSB of quotient is 1, add 1 to convert to two's complement notation
;
R2 = quotient (two's complement notation)
Содержание 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 ...