cset
Conditional Set
CSET <Wd>, <cond>
Sets register to 1 if condition true, else 0. (Alias for CSINC)
Pseudocode Operation
if ConditionHolds(cond) then
Wd ← 1
else
Wd ← 0
Example
CSET w0, cond
Encoding
Binary Layout
0
31
0
30
0
29
11010100
28:21
11111
20:16
cond
15:12
0
11
1
10
11111
9:5
Rd
4:0
Operands
-
Wd
Destination 32-bit integer register -
cond
Condition
Related
More in Base
Reference
View in Arm A64 ISA Reference ↗
Arm A64 ISA
Instruction Forms
| Encoding | Instruction | ISA | Bit pattern | ||
|---|---|---|---|---|---|
| 0x1A9F07E0 | CSET <Wd>, <invcond> | A64 | 0 | 0 | 0 | 11010100 | 11111 | cond | 0 | 1 | 11111 | Rd | ||
| 0x9A9F07E0 | CSET <Xd>, <invcond> | A64 | 1 | 0 | 0 | 11010100 | 11111 | cond | 0 | 1 | 11111 | Rd |
Description
Conditional Set sets the destination register to 1 if the condition is TRUE, and otherwise sets it to 0.