modud
Modulo Unsigned Doubleword
modud RT, RA, RB
Calculates remainder of unsigned doubleword division.
Encoding
Binary Layout
31
0:5
RT
6:10
RA
11:15
RB
16:20
265
21:30
/
31
Operands
-
RT
Target -
RA
Dividend -
RB
Divisor
Example
modud r3, r4, r5
Related
More in Base
Reference
View in PowerISA v3.1C Specification ↗
OPF Power ISA v3.1C
Description
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.
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.