The Cortex-M4 Instruction Set
ARM DUI 0553A
Copyright © 2010 ARM. All rights reserved.
3-76
ID121610
Non-Confidential
Restrictions
In these instructions, do not use SP and do not use PC.
If you use the S suffix with the
MUL
instruction:
•
Rd
,
Rn
, and
Rm
must all be in the range
R0
to
R7
•
Rd
must be the same as
Rm
•
you must not use the
cond
suffix.
Condition flags
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.
Examples
MUL
R10, R2, R5
; Multiply, R10 = R2 x R5
MLA
R10, R2, R1, R5 ; Multiply with accumulate, R10 = (R2 x R1) + R5
MULS
R0, R2, R2
; Multiply with flag update, R0 = R2 x R2
MULLT
R2, R3, R2
; Conditionally multiply, R2 = R3 x R2
MLS
R4, R5, R6, R7
; Multiply with subtract, R4 = R7 - (R5 x R6)