ori

OR Immediate

ori RT,RS,SImm
ori R31,R31,0

Performs a bitwise OR operation between the contents of a register and an immediate value, placing the result in another register.

Details

Performs a bitwise OR between a general-purpose register and a 16-bit unsigned immediate value, storing the result in another register. This is a base category instruction with no condition register or status updates.

Pseudocode Operation

RA ← RS | (0x0000 || UI)

Programming Note

Warning: Other forms of ori Rx,Rx,0 that are not described in this section may also have micro-architectural effects on program execution. Use of these forms should be avoided except when software needs the associated micro-architectural effects. Programming Note: This no-op is intended to be used by software for providing protection against the Spectre class of transient execution attacks by restricting eventually discarded out-of-order execution effects with transient register values, which may compromise confidential data via other covert channels.

Extended Mnemonics

Extended Mnemonic Equivalent Instruction
nop

Example

ori r3, r4, 0x1

// Set bit 0.

Encoding

Binary Layout
24
0
RS
6
RA
11
UI
16
 
Format D-form
Opcode 0x60000000
Extension Base

Operands

  • RA
    Target Register
  • RS
    Source Register
  • UI
    Unsigned 16-bit Immediate
  • RT
    Target General Purpose Register
  • SImm
    Sign-Extended 16-bit Immediate Value