Syntax
reml $s_reg1, $s_reg2, $d_reg
reml $d_reg/$s_reg1, $s_reg2
reml $s_reg1, val_immed, $d_reg
reml $d_reg/$s_reg1, val_immed
Description
Longword Remainder computes the remainder of the division of two signed 32-bit values. The remainder reml(i, j) is defined as i-(j*divl(i, j)) where j != 0. This instruction divides the contents of $s_reg1 by the contents of $s_reg2 or by the immediate value and then puts the remainder in the destination register.
The reml instruction rounds toward zero. For example, divl(5,-3)=-1 , and reml(5,-3)=2 .
For divide-by-zero, an error is signaled and a call_pal PAL_gentrap instruction may be issued.
Note The assembler destroys the contents of temporary registers $at, $t9, $t10, $t11, and $t12 for this instruction.