xori
XOR Immediate
xori RA, RS, UI
Performs a bitwise XOR with a 16-bit unsigned immediate.
Details
The xori instruction performs a bitwise XOR operation between the contents of register RS and an immediate value (480 || UI), and places the result into register RA.
Pseudocode Operation
RA <- RS XOR (0x0000 || UI)
Programming Note
The xori instruction is commonly used for setting or clearing specific bits in a register by XORing with a mask. Be cautious of overflow as this operation does not affect the carry flag. The immediate value is zero-extended to 64 bits before the XOR operation, so ensure that the upper bits are not inadvertently set if only lower bits are intended to be modified.
Example
xori r3, r4, 0x1
Encoding
Binary Layout
26
0
RS
6
RA
11
UI
16
Operands
-
RA
Target Register -
RS
Source Register -
UI
Unsigned 16-bit Immediate