Rev. 1.50, 10/04, page 228 of 448
10.1.15 DIV0S (Divide (Step 0) as Signed): Arithmetic Instruction
Format
Operation
Instruction Code
Cycle
T Bit
DIV0S Rm,Rn
MSB of Rn
→
Q,
MSB of Rm
→
M,
M^Q
→
T
0010nnnnmmmm0111
1
Result of
calculation
Description:
This instruction performs initial settings for signed division. This instruction is
followed by a DIV1 instruction that executes 1-digit division, for example, and repeated divisions
are executed to find the quotient. See the description of the DIV1 instruction for details.
Notes:
None
Operation:
DIV0S(long m, long n) /* DIV0S Rm,Rn */
{
if ((R[n] & 0x80000000)==0) Q = 0;
else Q = 1;
if ((R[m] & 0x80000000)==0) M = 0;
else M = 1;
T = !(M==Q);
PC += 2;
}
Example:
See the examples for the DIV1 instruction.
Содержание 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 ...