EasyManua.ls Logo

NXP Semiconductors LPC1768 - Restrictions; Condition Flags; Examples

NXP Semiconductors LPC1768
841 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
UM10360 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2013. All rights reserved.
User manual Rev. 3 — 20 December 2013 700 of 841
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
Section 34.2.10.7
.
To read the state of the Q flag, use the
MRS
instruction, see Section 34.2.10.6.
34.2.7.1.3 Restrictions
Do not use SP and do not use PC.
34.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.
34.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

Table of Contents

Other manuals for NXP Semiconductors LPC1768

Related product manuals