| |||
| Home > The Cortex-M3 Instruction Set > Multiply and divide instructions > MUL, MLA, and MLS | |||
Multiply, Multiply with Accumulate, and Multiply with Subtract, using 32-bit operands, and producing a 32-bit result.
MUL{S}{cond} {Rd,}Rn,Rm; Multiply
MLA{cond}Rd,Rn,Rm,Ra; Multiply with accumulate
MLS{cond} Rd, Rn, Rm, Ra ; Multiply with subtract
where:
condIs an optional condition code, see Conditional execution.
SIs
an optional suffix. If S is specified, the
condition code flags are updated on the result of the operation,
see Conditional execution.
RdSpecifies the destination register. If is
omitted, the destination register is Rd.Rn
Rn, RmAre registers holding the values to be multiplied.
RaIs a register holding the value to be added or subtracted from.
The MUL instruction multiplies the values from and Rn,
and places the least significant 32 bits of the result in Rm.Rd
The MLA instruction multiplies the values from and Rn,
adds the value from Rm,
and places the least significant 32 bits of the result in Ra.Rd
The MLS instruction multiplies the values from and Rn,
subtracts the product from the value from Rm,
and places the least significant 32 bits of the result in Ra.Rd
The results of these instructions do not depend on whether the operands are signed or unsigned.
In these instructions, do not use SP and do not use PC.
If you use the S suffix with the MUL instruction:
, Rd,
and Rn must all
be in the range RmR0 to R7
must
be the same as RdRm
you must not use the suffix.cond
If S is specified, the MUL instruction:
updates the N and Z flags according to the result
does not affect the C and V flags.