oris
OR Immediate Shifted
Performs a bitwise OR with a 16-bit immediate shifted left by 16 bits.
Details
Performs a bitwise OR between a general-purpose register and a 16-bit unsigned immediate value shifted left by 16 bits, storing the result in another register. This is a base category instruction used to set high-order bits with no condition register updates.
Pseudocode Operation
RA ← RS | (UI || 0x0000)
Programming Note
The oris instruction is commonly used to set specific bits in a register by ORing it with an immediate value. Be cautious of overflow if UI exceeds the upper limit, as it will be truncated. This instruction operates at user privilege level and does not generate exceptions under normal circumstances.
Example
// Set upper 16 bits.
Encoding
Operands
-
RA
Target Register -
RS
Source Register -
UI
Unsigned 16-bit Immediate