
DR
AFT
DR
AFT
DRAFT
DR
D
RAFT
DRAFT
DRA
FT DRAF
D
RAFT DRAFT DRAFT DRAFT DRAFT D
DRAFT
D
RAFT DRA
FT DRAFT DRAFT DRAFT DRA
UM10360_0
© NXP B.V. 2009. All rights reserved.
User manual
Rev. 00.06 — 5 June 2009
672 of 808
NXP Semiconductors
UM10360
Chapter 34: Appendix: Cortex-M3 User Guide
2.8.3 SXT and UXT
Sign extend and Zero extend.
2.8.3.1
Syntax
SXT
extend
{
cond
} {
Rd
,}
Rm
{, ROR #
n
}
UXT
extend
{
cond
} {
Rd
},
Rm
{, ROR #
n
}
where:
extend
is one of:
B:
Extends an 8-bit value to a 32-bit value.
H:
Extends a 16-bit value to a 32-bit value.
cond
is an optional condition code, see
Section 34–2.3.7 “Conditional execution”
.
Rd
is the destination register.
Rm
is the register holding the value to extend.
ROR #
n
is one of:
ROR #8:
Value from
Rm
is rotated right 8 bits.
ROR #16:
Value from
Rm
is rotated right 16 bits.
ROR #24:
Value from
Rm
is rotated right 24 bits.
If ROR #
n
is omitted, no rotation is performed.
2.8.3.2
Operation
These instructions do the following:
1. Rotate the value from
Rm
right by 0, 8, 16 or 24 bits.
2. Extract bits from the resulting value:
–
SXTB
extracts bits[7:0] and sign extends to 32 bits.
–
UXTB
extracts bits[7:0] and zero extends to 32 bits.
–
SXTH
extracts bits[15:0] and sign extends to 32 bits.
–
UXTH
extracts bits[15:0] and zero extends to 32 bits.
2.8.3.3
Restrictions
Do not use SP and do not use PC.
2.8.3.4
Condition flags
These instructions do not affect the flags.