Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

XOR / XORI

xor  rd, rs1, rs2
xori rd, rs1, imm12

Compute bitwise exclusive OR. The immediate is sign-extended. not rd, rs is the pseudoinstruction xori rd, rs, -1.

x86 connection: equivalent bit operation to xor, but xor rd, rd, rd is unnecessary for producing zero—you can use x0 directly or li rd, 0.