
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
668 of 808
NXP Semiconductors
UM10360
Chapter 34: Appendix: Cortex-M3 User Guide
•
otherwise, the result returned is the same as the value to be saturated.
If the returned result is different from the value to be saturated, it is called
saturation
. If
saturation occurs, the instruction sets the Q flag to 1 in the APSR. Otherwise, it leaves the
Q flag unchanged. To clear the Q flag to 0, you must use the
MSR
instruction, see
To read the state of the Q flag, use the
MRS
instruction, see
.
2.7.1.3
Restrictions
Do not use SP and do not use PC.
2.7.1.4
Condition flags
These instructions do not affect the condition code flags.
If saturation occurs, these instructions set the Q flag to 1.
2.7.1.5
Examples
SSAT
R7, #16, R7, LSL #4
; Logical shift left value in R7 by 4, then
; saturate it as a signed 16-bit value and
; write it back to R7
USATNE
R0, #7, R5
; Conditionally saturate value in R5 as an
; unsigned 7 bit value and write it to R0