NEC uPD98502 User Manual page 475

Network controller
Table of Contents

Advertisement

DIV
31
26 25
SPECIAL
0 0 0 0 0 0
6
Format:
DIV rs, rt
Description:
The contents of general register rs are divided by the contents of general register rt, treating both operands as 2's
complement values. No overflow exception occurs under any circumstances, and the result of this operation is
undefined when the divisor is zero.
In 64-bit mode, the operands must be valid sign-extended, 32-bit values.
This instruction is typically followed by additional instructions to check for a zero divisor and for overflow.
When the operation completes, the quotient word of the double result is loaded into special register LO , and the
remainder word of the double result is loaded into special register HI .
If either of the two preceding instructions is MFHI or MFLO, the results of those instructions are undefined. Correct
operation requires separating reads of HI or LO from writes by two or more instructions.
Operation:
← undefined
32
T-2:
LO
← undefined
HI
← undefined
T-1:
LO
← undefined
HI
← GPR [rs] div GPR [rt]
T:
LO
← GPR [rs] mod GPR [rt]
HI
← undefined
64
T-2:
LO
← undefined
HI
← undefined
T-1:
LO
← undefined
HI
← GPR [rs]
T:
q
← GPR [rs]
r
← (q
LO
31
← (
HI
r
31
Exceptions:
None
APPENDIX A MIPS III INSTRUCTION SET DETAILS
Divide
21 20
rs
rt
5
5
div GPR [rt]
31..0
31..0
mod GPR [rt]
31..0
31..0
32
)
|| q
31..0
32
)
|| r
31..0
Preliminary User's Manual S15543EJ1V0UM
16 15
0
0 0 0 0 0 0 0 0 0 0
10
DIV
6 5
0
DIV
0 1 1 0 1 0
6
475

Advertisement

Table of Contents
loading

Table of Contents