VOR.VI

RISC-V VOR.VI Instruction Details

Instruction ManualI-type

Element-wise bitwise OR.

Instruction Syntax

vor.vi vd, vs2, imm, vm
Operand Breakdown
Destination rd: general-purpose register receiving the result.
Source rs1: register holding the first operand.
Immediate imm: 12-bit signed value, sign-extended before operation with rs1.
VVector IntegerBitwise

Instruction Behavior

VOR.VI performs bitwise OR on active elements, ORing vs2 with the sign-extended 5-bit immediate and writing vd.

Quick Understanding & Search Notes

VOR.VI is ordinary vector integer logical OR, useful for setting bit fields or combining data bit patterns outside mask-register logic.

Only active elements are written; inactive and tail elements follow vma/vta policies.
The VI immediate is a 5-bit signed immediate extended to SEW.
Do not confuse this with VMOR.MM, which operates on mask-register bits.

Common Usage Scenarios

Flag Setting

Understand this scenario with real code like «vor.vi v8, v12, 7, v0.t».

Mask Merging

Understand this scenario with real code like «vor.vi v8, v12, 7, v0.t».

Pre-Use Checklist

Syntax Check
  • Confirm the current instruction format is I-type.
  • Confirm the operand order matches the example.
Semantic Check
  • Ensure the destination register usage is compatible with the calling convention.
  • Confirm this is not the lower-level form of a pseudo-instruction expansion.

Pitfalls / Common Confusions

Immediate 5-bit
Large values need vor.vx

FAQ

Is VOR.VI a mask logical instruction?

No. It writes ordinary vector elements; mask-register logic uses dedicated instructions such as VMOR.MM.