isel
Integer Select
isel RT, RA, RB, BC
Conditionally copies RA or RB to RT based on a CR bit. (Equivalent to C ternary operator 'cond ? a : b').
Details
The isel instruction selects the value from either RA or RB to store in RT based on the specified condition register bit BC.
Pseudocode Operation
if RA=0 then a ←0 else a ←(RA)
if CRBC+32=1 then
RT ←a
else
RT ←(RB)
Programming Note
isel is used for conditional moves based on the condition register.
Extended Mnemonics
| Extended Mnemonic | Equivalent Instruction |
|---|---|
| iselgt | |
| iseleq | |
| isellt |
Example
isel r3, r4, r5, 2
Encoding
Binary Layout
31
0
RT
6
RA
11
RB
16
BC
21
15
26
/
31
Operands
-
RT
Target Register -
RA
Source (If True) - 0 means 0 -
RB
Source (If False) -
BC
CR Bit Index (Condition) -
CR
Condition Register Field