![Atmel SAM4S Series Preliminary Data Sheet Download Page 148](http://html1.mh-extra.com/html/atmel/sam4s-series/sam4s-series_preliminary-data-sheet_3003408148.webp)
148
11100B–ATARM–31-Jul-12
SAM4S Series [Preliminary]
11.6.6.11
UMULL, UMLAL, SMULL, and SMLAL
Signed and Unsigned Long Multiply, with optional Accumulate, using 32-bit operands and pro-
ducing a 64-bit result.
Syntax
op{cond} RdLo, RdHi, Rn, Rm
where:
Operation
The
UMULL
instruction interprets the values from
Rn
and
Rm
as unsigned integers. It multiplies
these integers and places the least significant 32 bits of the result in
RdLo
, and the most signifi-
cant 32 bits of the result in
RdHi
.
The
UMLAL
instruction interprets the values from
Rn
and
Rm
as unsigned integers. It multiplies
these integers, adds the 64-bit result to the 64-bit unsigned integer contained in
RdHi
and
RdLo
,
and writes the result back to
RdHi
and
RdLo
.
The
SMULL
instruction interprets the values from
Rn
and
Rm
as two’s complement signed integers.
It multiplies these integers and places the least significant 32 bits of the result in
RdLo
, and the
most significant 32 bits of the result in
RdHi
.
The
SMLAL
instruction interprets the values from
Rn
and
Rm
as two’s complement signed integers.
It multiplies these integers, adds the 64-bit result to the 64-bit signed integer contained in
RdHi
and
RdLo
, and writes the result back to
RdHi
and
RdLo
.
Restrictions
In these instructions:
• do not use SP and do not use PC
•
RdHi
and
RdLo
must be different registers.
Condition Flags
These instructions do not affect the condition code flags.
Examples
UMULL
R0, R4, R5, R6
; Unsigned (R4,R0) = R5 x R6
SMLAL
R4, R5, R3, R8
; Signed (R5,R4) = (R5,R4) + R3 x R8
op
is one of:
UMULL
Unsigned Long Multiply.
UMLAL
Unsigned Long Multiply, with Accumulate.
SMULL
Signed Long Multiply.
SMLAL
Signed Long Multiply, with Accumulate.
cond
is an optional condition code, see
RdHi, RdLo
are the destination registers. For
UMLAL
and
SMLAL
they also hold the accumulating
value.
Rn, Rm
are registers holding the operands.
Summary of Contents for SAM4S Series
Page 44: ...44 11100B ATARM 31 Jul 12 SAM4S Series Preliminary ...
Page 412: ...412 11100B ATARM 31 Jul 12 SAM4S Series Preliminary ...
Page 1105: ...1105 11100B ATARM 31 Jul 12 SAM4S Series Preliminary ...
Page 1143: ...1143 11100B ATARM 31 Jul 12 SAM4S Series Preliminary Figure 43 4 64 lead LQFP Package Drawing ...
Page 1145: ...1145 11100B ATARM 31 Jul 12 SAM4S Series Preliminary Figure 43 5 64 lead QFN Package Drawing ...