CSEL
Select on condition
Choose between two registers according to NZCV.
| Form | Bits | Requires | Encoding |
|---|---|---|---|
CSEL Wd, Wn, Wm, cond | 32 | Armv8-A | 00011010100xxxxxxxxx00xxxxxxxxxx |
CSEL Xd, Xn, Xm, cond | 64 | Armv8-A | 10011010100xxxxxxxxx00xxxxxxxxxx |
Operation#
Pseudo-C · selected form
Rd = condition_holds(cond, NZCV) ? Rn : RmWhat to watch for
- Both choices have the selected register width. AL and NV select Rn.
Architectural details#
- Flags
- Reads NZCV; leaves NZCV unchanged.
- Destination
- Writing Wd clears the corresponding X register’s upper 32 bits. Writes to ZR are discarded; SP is not accepted.
- Encoding
00011010100xxxxxxxxx00xxxxxxxxxx- Operands
Wdwrite · 32 bitsWnread · 32 bitsWmread · 32 bitscondread
- Coverage
- Selected baseline A64 scalar register forms.
- cond
- EQ, NE, CS, HS, CC, LO, MI, PL, VS, VC, HI, LS, GE, LT, GT, LE, AL, NV.
- Conditions
EQ: Z = 1NE: Z = 0CS / HS: C = 1CC / LO: C = 0MI: N = 1PL: N = 0VS: V = 1VC: V = 0HI: C = 1 and Z = 0LS: C = 0 or Z = 1GE: N = VLT: N ≠ VGT: Z = 0 and N = VLE: Z = 1 or N ≠ VAL / NV: Always
Exception information & execution requirements
Complete exception conditions have not been imported.
MRS supplies encoding and availability conditions, not an exhaustive exception model.
Feature availability alone does not guarantee execution: OS state and execution-level controls also apply. Use the linked architecture documentation for the full exception conditions.
Sources & provenance#
Technical fields are imported from pinned upstream files. Explanations and explorer behavior are maintained separately.
Architectural references for this form
Arm · aarchmrs
- Revision
2026-03_rel- SHA-256
bf355d263eed08ef6b3e4e680e6bba3642fa7c3dd0be77ffb4783420041a0860- Terms
- BSD-3-Clause