AcornSearch - Acorn and RISC OS information searching
RISC OS Search
containing
"Nutty quip goes here!"
Home  |  About  |  Filebase Archive  |  StrongHelp Manuals  |  Newsgroups  |  Module Database
Syntax:          MLA {<cond>} {S} <destination>, <operand1>, <operand2>, <sum>
Operation:     destination = (operand one * operand two) + sum
Flags:          N,Z,C see note

This instruction is similar to MUL, the difference being that the contents of the register given in the sum field are added into the result of the multiplication before storing it in the destination register. The restrictions which apply to MUL also apply to MLA.

MLA is used to keep a running total of a series of multiplications. If the sum register is specified as being the same as the destination, then the result of each multiplication will be accumulated in the destination register.

Sign is unimportant, as this is a 32x32 multiply - any overflow is discarded.

Examples:
MLA  R0,R1,R2,R3     ; R0 = (R1 * R2) + R3
MLA  R0,R1,R2,R0     ; R0 = (R1 * R2) + R0

This instruction was introduced in ARM architecture 2.

[sh-index] Back to list of manuals