
Page 22
4.17 MLA – Multiply-Accumulate
Syntax:
MLA{<cond>}{S} <Rd >, <Rm>, <Rs>, <Rn>
RTL:
if(cond)
Rd Rn + (Rs • Rm)
Flags updated if S used:
N, Z (C is unpredictable)
Encoding:
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
cond 0 0 0 0 0 0 1 S Rd Rn Rs 1 0 0 1 Rm
Usage and Examples:
MLA performs a 32x32 multiply operation, then stores the sum of Rn and the 32-bit
multiplication result to Rd. Since only the least significant 32-bits of the multiplication
are used, the result is the same for signed and unsigned numbers.
The instruction below adds the product of R1 and R2 to R0.
MLA R0, R1, R2, R0
4.18 MOV – Move
Syntax:
MOV{<cond>}{S} <Rd>, <shifter_operand>
RTL:
if(cond)
Rd shifter_operand
if(S==1 and Rd==R15)
CPSR SPSR
Flags updated if S used and Rd is not R15 (PC):
N, Z, C
Encoding:
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
cond 0 0 I 1 1 0 1 S SBZ Rd shifter operand
Usage and Examples:
MOV performs a move to a register from another register or an immediate value.
MOV R1, R0, LSL #2 ;R1 <- R0 * 4
MOV R1, #1 ;R1 <- 0x0000001
If the S bit is set and the destination is R15 (the PC), the SPSR is also copied to CPSR.
This form of the instruction used to return from an exception mode.
Comments to this Manuals