setnbc
Set Negative Boolean Condition
setnbc RT, BI
Sets RT to -1 if CR bit is set, else 0.
Details
Sets the target GPR to -1 (all bits set) if the specified condition register bit is set, otherwise sets it to 0. This instruction operates entirely on the CR and target register, with no side effects on other status fields.
Pseudocode Operation
if CR[BI] = 1 then RT ← -1 else RT ← 0
Programming Note
Use setnbc to conditionally set a register based on a specific bit in the Condition Register. Ensure CRBI is within valid range; otherwise, results are undefined. This instruction operates at user privilege level and does not generate exceptions under normal conditions.
Example
setnbc r3, 0
Encoding
Binary Layout
31
0
RT
6
BI
11
/
16
448
21
/
31
Operands
-
RT
Target -
BI
CR Bit