xoris
XOR Immediate Shifted
xoris RA, RS, UI
Performs a bitwise XOR with a 16-bit immediate shifted left by 16 bits.
Details
The xoris instruction performs a bitwise XOR operation between the contents of register RS and an immediate value shifted left by 12 bits (480 || UI), and stores the result in register RA.
Pseudocode Operation
RA <- RS XOR (UI || 0x0000)
Programming Note
The xoris instruction is useful for performing bitwise operations with a large immediate value. Be cautious of overflow if the immediate value exceeds 16 bits, as only the lower 16 bits are considered. This instruction operates at user privilege level and does not generate exceptions under normal circumstances.
Example
xoris r3, r4, 0xFFFF
Encoding
Binary Layout
27
0
RS
6
RA
11
UI
16
Operands
-
RA
Target Register -
RS
Source Register -
UI
Unsigned 16-bit Immediate