crxor

Condition Register XOR

crxor BT, BA, BB

Performs a bitwise XOR between two bits in the Condition Register. Used to clear CR bits (crxor x,x,x).

Details

Performs a bitwise XOR of CR bit BA and CR bit BB, storing the result in CR bit BT. When BA and BB are the same bit, this effectively clears CR[BT]; this form is frequently used for clearing condition register fields.

Pseudocode Operation

CR[BT] ← CR[BA] ^ CR[BB]

Programming Note

The crxor instruction is used to perform a bitwise XOR operation between two condition register bits and store the result in another condition register bit. Ensure that the BA, BB, and BT fields are correctly set to avoid unintended behavior. This instruction operates at the problem state privilege level.

Example

crxor 0, 0, 0

// Clears CR bit 0 (sets it to 0).

Encoding

Binary Layout
19
0
BT
6
BA
11
BB
16
193
21
/
31
 
Format XL-form
Opcode 0x4C000182
Extension Base
Registers Altered CR

Operands

  • BT
    Target Bit
  • BA
    Source Bit A
  • BB
    Source Bit B