Datasheet

UM10398 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2014. All rights reserved.
User manual Rev. 12.3 — 10 June 2014 494 of 547
NXP Semiconductors
UM10398
Chapter 28: LPC111x/LPC11Cxx Appendix: ARM Cortex-M0 reference
where:
Rd is the destination register.
Rn, Rm are registers holding the values to be multiplied.
28.5.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 Section 28–28.5.3.6
.
The results of this instruction does not depend on whether the operands are signed or
unsigned.
28.5.5.6.3 Restrictions
In this instruction:
Rd, Rn, and Rm must only specify R0-R7
Rd must be the same as Rm.
28.5.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.
28.5.5.6.5 Examples
MULS R0, R2, R0 ; Multiply with flag update, R0 = R0 x R2
28.5.5.7 REV, REV16, and REVSH
Reverse bytes.
28.5.5.7.1 Syntax
REV Rd, Rn
REV16 Rd, Rn
REVSH Rd, Rn
where:
Rd is the destination register.
Rn is the source register.
28.5.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.