setnbcr
Set Negative Boolean Condition Reverse
setnbcr RT, BI
Sets RT to -1 if CR bit is clear, else 0.
Details
Sets the target GPR to -1 (all bits set) if the specified condition register bit is clear, otherwise sets it to 0. This is the logical inverse of setnbc, with no side effects on other status fields.
Pseudocode Operation
if CR[BI] = 0 then RT ← -1 else RT ← 0
Programming Note
Use setnbcr when you need to invert a condition bit in the Condition Register into a boolean value. Ensure that the target register RT is properly aligned and accessible. This instruction operates at user privilege level, so no special permissions are required. Be cautious of potential performance impacts if used in tight loops.
Example
setnbcr r3, 0
Encoding
Binary Layout
31
0
RT
6
BI
11
/
16
480
21
/
31
Operands
-
RT
Target -
BI
CR Bit