modud
Modulo Unsigned Doubleword
modud RT, RA, RB
Calculates remainder of unsigned doubleword division.
Details
Calculates the unsigned remainder (modulo) of a 64-bit doubleword division, storing the result in RT. The dividend is in RA and the divisor is in RB. No status flags are affected; division by zero is not trapped and produces undefined results.
Pseudocode Operation
RT ← (RA mod RB)
Programming Note
The modud instruction is used for performing an unsigned doubleword modulo operation. Ensure that the divisor in register RB is not zero to avoid undefined behavior. The result is placed in register RT, and this instruction operates at user privilege level.
Example
modud r3, r4, r5
Encoding
Binary Layout
31
0
RT
6
RA
11
RB
16
265
21
/
31
Operands
-
RT
Target -
RA
Dividend -
RB
Divisor