![ARM Cortex-M4 Generic User Manual Download Page 135](http://html.mh-extra.com/html/arm/cortex-m4/cortex-m4_generic-user-manual_2973228135.webp)
The Cortex-M4 Instruction Set
ARM DUI 0553A
Copyright © 2010 ARM. All rights reserved.
3-88
ID121610
Non-Confidential
3.6.8
SMMUL
Signed Most Significant Word Multiply.
Syntax
op{
R
}{
cond
}
Rd
,
Rn
,
Rm
where:
op
Is one of:
SMMUL
Signed Most Significant Word Multiply
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 operands.
Operation
The
SMMUL
instruction interprets the values from
Rn
and
Rm
as two’s complement 32-bit signed
integers. The
SMMUL
instruction:
•
Multiplies the values from
Rn
and
Rm
.
•
Optionally rounds the result, otherwise truncates the result.
•
Writes the most significant signed 32 bits of the result in
Rd
.
Restrictions
In this instruction:
•
do not use SP and do not use PC.
Condition flags
This instruction does not affect the condition code flags.
Examples
SMULL
R0, R4, R5 ; Multiplies R4 and R5, truncates top 32 bits
; and writes to R0
SMULLR R6, R2 ; Multiplies R6 and R2, rounds the top 32 bits
; and writes to R6.