UM10429
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2010. All rights reserved.
User manual
Rev. 1 — 20 October 2010
216 of 258
NXP Semiconductors
UM10429
Chapter 19: Appendix LPC1102 ARM Cortex-M0 reference
where:
Rd
is the destination register.
Rn, Rm
are registers holding the values to be multiplied.
19.4.5.6.2
Operation
The MUL instruction multiplies the values in the registers specified by
Rn
and
Rm
, and
places the least significant 32 bits of the result in
Rd
. The condition code flags are
updated on the result of the operation, see
.
The results of this instruction does not depend on whether the operands are signed or
unsigned.
19.4.5.6.3
Restrictions
In this instruction:
•
Rd
,
Rn
, and
Rm
must only specify R0-R7
•
Rd
must be the same as
Rm
.
19.4.5.6.4
Condition flags
This instruction:
•
updates the N and Z flags according to the result
•
does not affect the C or V flags.
19.4.5.6.5
Examples
MULS
R0, R2, R0
; Multiply with flag update, R0 = R0 x R2
19.4.5.7 REV, REV16, and REVSH
Reverse bytes.
19.4.5.7.1
Syntax
REV Rd,
Rn
REV16 Rd,
Rn
REVSH Rd,
Rn
where:
Rd
is the destination register.
Rn
is the source register.
19.4.5.7.2
Operation
Use these instructions to change endianness of data:
REV —
converts 32-bit big-endian data into little-endian data or 32-bit little-endian data
into big-endian data.
REV16 —
converts two packed 16-bit big-endian data into little-endian data or two packed
16-bit little-endian data into big-endian data.