| |||
| Home > The Cortex-M3 Instruction Set > Multiply and divide instructions > SDIV and UDIV | |||
Signed Divide and Unsigned Divide.
SDIV{cond} {Rd,} Rn, Rm
UDIV{cond} {Rd,} Rn, Rm
where:
condIs an optional condition code, see Conditional execution.
RdSpecifies the destination register. If is
omitted, the destination register is Rd.Rn
RnSpecifies the register holding the value to be divided.
RmIs a register holding the divisor.
SDIV performs a signed integer division of the
value in by
the value in Rn.Rm
UDIV performs an unsigned integer division of
the value in by
the value in Rn.Rm
For both instructions, if the value in is
not divisible by the value in Rn,
the result is rounded towards zero.Rm