The following can be specified for imm:
Divides the register value specified by the second operand by the register value specified by the first operand as an unsigned value and stores the quotient in the register specified by the second operand, and the remainder in the register specified by the third operand. If the same register is specified by the second and third operands, the remainder is stored in that register.
Divides the register value specified by the second operand by the value of the absolute or relative expression specified by the first operand as an unsigned value and stores the quotient in the register specified by the second operand, and the remainder in the register specified by the third operand. If the same register is specified by the second and third operands, the remainder is stored in that register.
If the instruction is executed in syntax "divu reg1, reg2, reg3", the assembler generates one divu machine instruction. |
If the instruction is executed in syntax "divu imm, reg2, reg3", and the following expression is specified for imm, the assembler executes instruction expansion to generate one or more machine instructionsNote. |
Absolute expression exceeding the range of -16 to +15, but within the range of -32,768 to +32,767 |
If all the lower 16 bits of the value of imm are 0
Relative expression having !label or %label, or that having $label for a label having a definition in the sdata/sbss-attribute section |
divu !label, reg2, reg3 |
movea !label, r0, r1 divu r1, reg2, reg3 |
divu %label, reg2, reg3 |
movea %label, r0, r1 divu r1, reg2, reg3 |
divu $label, reg2, reg3 |
movea $label, r0, r1 divu r1, reg2, reg3 |
Relative expression having #label or label, or that having $label for a label having no definition in the sdata/sbss-attribute section |