Is the immediate zero-extended?
ORI immediate forms use a 12-bit signed immediate that is sign-extended to XLEN.
Bitwise OR of rs1 with sign-extended 12-bit immediate, result in rd
ORI uses opcode 0010011 (0x13), funct3 110. The rs1 field selects the source register, the 12-bit immediate provides the second operand, and rd selects the destination.
ORI performs bitwise OR of rs1 with the sign-extended 12-bit immediate, writing to rd. Commonly used to set specific bits (masking), merge register values with constants, and combine with LUI to construct arbitrary 32-bit constants.
ORI is a base integer bitwise logical instruction. It operates across XLEN bits; immediate forms use a sign-extended 12-bit immediate.
Understand this scenario with real code like «ori x5, x6, 0x0F # x5 = x6 | 0x0F».
Understand this scenario with real code like «ori x5, x6, 0x0F # x5 = x6 | 0x0F».
Understand this scenario with real code like «ori x5, x6, 0x0F # x5 = x6 | 0x0F».
ORI immediate forms use a 12-bit signed immediate that is sign-extended to XLEN.
The base integer ISA has no condition-code flags; only rd is written.