xor
XOR
xor RA, RS, RB
Performs a bitwise Exclusive OR comparison.
Encoding
Binary Layout
31
0:5
RS
6:10
RA
11:15
RB
16:20
316
21:30
Rc
31
Operands
-
RA
Target Register -
RS
Source Register 1 -
RB
Source Register 2
Reference
View in PowerISA v3.1C Specification ↗
OPF Power ISA v3.1C
Description
Perform a bitwise XOR of RS and RB, storing the result in RA. If Rc=1, CR0 is updated with the comparison flags based on the result. This is a Base category logical instruction.
Operation
RA ← RS ⊕ RB
if Rc = 1 then
CR0 ← (RA = 0) || LT || GT || SO
Programming Note
When Rc=1 (dot form), CR0 is updated with the signed comparison of the result against zero (LT, GT, EQ) and the current SO bit from XER.