![](http://datasheet.mmic.net.cn/380000/-PD98501_datasheet_16745028/-PD98501_104.png)
CHAPTER 2 V
R
4120A
104
Preliminary User’s Manual S14767EJ1V0UM00
Table 2-37. Two-/Three-Operand Register Type (1/2)
Instruction
Format and Description
Add Unsigned
ADDU rz, rx, ry
The contents of general registers rx and ry are added together to form a 32-bit result. The result is
placed into general register rz. No integer overflow exception occurs under any circumstances. In the
64-bit mode, the operand must be a 64-bit value formed by sign-extending a 32-bit value.
Subtract Unsigned
SUBU rz, rx, ry
The contents of general register ry are subtracted from the contents of general register rx. The 32-bit
result is placed into general register rz. No integer overflow exception occurs under any
circumstances. In the 64-bit mode, the operand must be a 64-bit value formed by sign-extending a 32-
bit value.
Doubleword Add
Unsigned
DADDU rz, rx, ry
The contents of general register ry are added to the contents of general register rx. The 64-bit result is
placed into register rz. No integer overflow exception occurs under any circumstances.
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 Subtract
Unsigned
DSUBU rz, rx, ry
The contents of general register ry are subtracted from the contents of general register rx. The 64-bit
result is placed into general register rz. No integer overflow exception occurs under any
circumstances.
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.
Set on Less Than
SLT rx, ry
The contents of general register ry are subtracted from the contents of general register rx. Considering
both quantities as signed integers, if the contents of rx are less than the contents of ry, the result is set
to 1; otherwise, the result is set to 0. The result is placed into register T ($24).
No integer overflow exception occurs. The comparison is valid even if the subtraction overflows.
Set on Less Than
Unsigned
SLTU rx, ry
The contents of general register ry are subtracted from the contents of general register rx. Considering
both quantities as unsigned integers, if the contents of rx are less than the contents of ry, the result is
set to 1; otherwise, the result it set to 0. The result is place in register T ($24).
No integer overflow exception occurs. The comparison is valid even if the subtraction overflows.
Compare
CMP rx, ry
The contents of general register ry are Exclusive-ORed with the contents of general register rx. The
result is placed into register T ($24).
Negate
NEG rx, ry
The contents of general register ry are subtracted from zero to form a 32-bit result. The result is
placed in general register rx.
AND
AND rx, ry
The contents of general register ry are logical ANDed with the contents of general register rx in 1-bit
units. The result is placed in general register rx.
OR
OR rx, ry
The contents of general register ry are logical ORed with the contents of general register ry. The result
is placed in general register rx.