
ARM Instruction Set - MUL, MLA
ARM7TDMI Data Sheet
ARM DDI 0029E
4-24
O
4.7.1 Operand restrictions
The destination register Rd must not be the same as the operand register Rm. R15
must not be used as an operand or as the destination register.
All other register combinations will give correct results, and Rd, Rn and Rs may use
the same register when required.
4.7.2 CPSR flags
Setting the CPSR flags is optional, and is controlled by the S bit in the instruction. The
N (Negative) and Z (Zero) flags are set correctly on the result (N is made equal to bit
31 of the result, and Z is set if and only if the result is zero). The C (Carry) flag is set
to a meaningless value and the V (oVerflow) flag is unaffected.
4.7.3 Instruction cycle times
MUL takes 1S + mI and MLA 1S + (m+1)I cycles to execute, where S and I are as
defined in
·
6.2 Cycle Types
on page 6-2.
m
is the number of 8 bit multiplier array cycles required to complete the
multiply, which is controlled by the value of the multiplier operand
specified by Rs. Its possible values are as follows
1
2
3
4
if bits [32:8] of the multiplier operand are all zero or all one.
if bits [32:16] of the multiplier operand are all zero or all one.
if bits [32:24] of the multiplier operand are all zero or all one.
in all other cases.
4.7.4 Assembler syntax
MUL{cond}{S} Rd,Rm,Rs
MLA{cond}{S} Rd,Rm,Rs,Rn
{cond}
two-character condition mnemonic. See
·
Table 4-2:
Condition code summary
on page 4-5.
{S}
set condition codes if S present
Rd, Rm, Rs and Rn
are expressions evaluating to a register number other
than R15.
4.7.5 Examples
MUL
MLAEQS
R1,R2,R3
R1,R2,R3,R4 ; Conditionally R1:=R2*R3+R4,
; setting condition codes.
; R1:=R2*R3