![](http://datasheet.mmic.net.cn/380000/-PD98501_datasheet_16745028/-PD98501_108.png)
CHAPTER 2 V
R
4120A
108
Preliminary User’s Manual S14767EJ1V0UM00
Table 2-39. Multiply/Divide Instructions (2/2)
Instruction
Format and Description
Doubleword Multiply
DMULT rx, ry
The 64-bit contents of general register rx and ry are multiplied, treating both operands as two's
complement values. No integer overflow exception occurs. The low-order 64 bits of the result are
placed in special register LO, and the high-order 64 bits are placed in special register HI.
If either of the two immediately preceding instructions is MFHI or MFLO, the result of execution of
these transfer instructions is undefined. To obtain the correct result, insert two or more other
instructions between the MFHI, MFLO instructions and the DMULT instruction.
This operation is defined in the 64-bit mode and the 32-bit kernel mode. When this instruction is
executed in the 32-bit user/supervisor mode, a reserved instruction exception is generated.
Doubleword Multiply
Unsigned
DMULTU rx, ry
The 64-bit contents of general registers rx and ry are multiplied, treating both operands as unsigned
values. No integer overflow exception occurs. The low-order 64 bits of the result are placed in special
register LO, and the high-order 64 bits of the result are placed in special register HI.
If either of the two immediately preceding instructions is MFHI or MFLO, the result of execution of
these transfer instructions is undefined. To obtain the correct result, insert two or more other
instructions between the MFHI, MFLO instructions and the DMULTU instruction.
This operation is defined in the 64-bit mode and the 32-bit kernel mode. When this instruction is
executed in the 32-bit user/supervisor mode, a reserved instruction exception is generated.
Doubleword Divide
DDIV rx, ry
The 64-bit contents of general registers rx are divided by the contents of general register ry, treating
both operands as two's complement values. No integer overflow exception occurs. The result when
the divisor is 0 is undefined. The 64-bit quotient is placed in special register LO, and the 64-bit
remainder is placed in special register HI. Normally, this instruction is executed after instructions
checking for division by zero and overflow.
If either of the two immediately preceding instructions is MFHI or MFLO, the result of execution of
these transfer instructions is undefined. To obtain the correct result, insert two or more other
instructions between the MFHI, MFLO instructions and the DDIV instruction.
This operation is defined in the 64-bit mode and the 32-bit kernel mode. When this instruction is
executed in the 32-bit user/supervisor mode, a reserved instruction exception is generated.
Doubleword Divide
Unsigned
DDIVU rx, ry
The 64-bit contents of general register rx are divided by the contents of general register ry, treating
both operands as unsigned values. No integer overflow exception occurs. The result when the divisor
is 0 is undefined. The 64-bit quotient is placed in special register LO, and the 64-bit remainder is
placed in special register HI. Normally, this instruction is executed after an instruction checking for
division by zero.
If either of the two immediately preceding instructions is MFHI or MFLO, the result of execution of
these transfer instructions is undefined. To obtain the correct result, insert two or more other
instructions between the MFHI, MFLO instructions and the DDIVU instruction.
This operation is defined in the 64-bit mode and the 32-bit kernel mode. When this instruction is
executed in the 32-bit user/supervisor mode, a reserved instruction exception is generated.