ORI

Logical OR Immediate

ORI rd, rs1, imm

Performs a bitwise logical OR with a sign-extended immediate.

Encoding

Binary Layout
imm12
31:20
rs1
19:15
110
14:12
rd
11:7
0010011
6:0
 
Format I-Type
Opcode 0x00006013
Extension RV32I

Operands

  • rd
    Destination register (integer)
  • rs1
    Source
  • imm
    Signed immediate value

Example

ORI x10, x11, 1

// Sets the lowest bit of x11.

Related

More in RV32I

Description

ORI performs a bitwise OR of register rs1 with the sign-extended 12-bit immediate, writing the result to rd.

Operation

R[rd] = R[rs1] | sext(imm);