The Cortex-M4 Instruction Set
ARM DUI 0553A
Copyright © 2010 ARM. All rights reserved.
3-86
ID121610
Non-Confidential
3.6.7
SMMLA and SMMLS
Signed Most Significant Word Multiply Accumulate and Signed Most Significant Word
Multiply Subtract.
Syntax
op{
R
}{
cond
}
Rd
,
Rn
,
Rm
,
Ra
where:
op
Is one of:
SMMLA
Signed Most Significant Word Multiply Accumulate.
SMMLS
Signed Most Significant Word Multiply Subtract.
R
Is a rounding error flag. If
R
is specified, the result is rounded instead of being
truncated. In this case the constant
0x80000000
is added to the product before the
high word is extracted.
cond
Is an optional condition code, see
.
Rd
Specifies the destination register.
Rn, Rm
Are registers holding the first and second multiply operands.
Ra
Specifies the register holding the accumulate value.
Operation
The
SMMLA
instruction interprets the values from
Rn
and
Rm
as signed 32-bit words.
The
SMMLA
instruction:
•
Multiplies the values in
Rn
and
Rm
.
•
Optionally rounds the result by adding
0x80000000
.
•
Extracts the most significant 32 bits of the result.
•
Adds the value of
Ra
to the signed extracted value.
•
Writes the result of the addition in
Rd
.
The
SMMLS
instruction interprets the values from
Rn
and
Rm
as signed 32-bit words.
The
SMMLS
instruction:
•
Multiplies the values in
Rn
and
Rm
.
•
Optionally rounds the result by adding
0x80000000
.
•
Extracts the most significant 32 bits of the result.
•
Subtracts the extracted value of the result from the value in
Ra
.
•
Writes the result of the subtraction in
Rd
.
Restrictions
In these instructions:
•
Do not use SP and do not use PC.
Condition flags
These instructions do not affect the condition code flags.