![ARM Cortex-M4 Generic User Manual Download Page 117](http://html.mh-extra.com/html/arm/cortex-m4/cortex-m4_generic-user-manual_2973228117.webp)
The Cortex-M4 Instruction Set
ARM DUI 0553A
Copyright © 2010 ARM. All rights reserved.
3-70
ID121610
Non-Confidential
3.5.21
SEL
Select Bytes. Selects each byte of its result from either its first operand or its second operand,
according to the values of the GE flags.
Syntax
SEL{<c>}{<q>} {<Rd>,} <Rn>, <Rm>
where:
<c>, <q>
Is a standard assembler syntax fields.
<Rd>
Specifies the destination register.
<Rn>
Specifies the first operand register.
<Rm>
Specifies the second operand register.
Operation
The
SEL
instruction:
1.
Reads the value of each bit of APSR.GE.
2.
Depending on the value of APSR.GE, assigns the destination register the value of either
the first or second operand register.
Restrictions
None.
Condition flags
These instructions do not change the flags.
Examples
SADD16 R0, R1, R2 ; Set GE bits based on result
SEL R0, R0, R3
; Select bytes from R0 or R3, based on GE.