VOR.VV

RISC-V VOR.VV Instruction Details

Instruction ManualOPIVV (OP-V)

VOR.VV applies SEW-width integer bitwise OR to active RVV elements.

Instruction Syntax

vor.vv vd, vs2, vs1, vm
Operand Breakdown
Syntax: vor.vv vd, vs2, vs1[, v0.t]; omit v0.t for vm=1, include it for vm=0. 32-bit OP-V: opcode=1010111, funct6=001010, funct3=000.
vd, vs2 and a vector second source are ordinary SEW/LMUL groups. Active elements compute vs2[i] | second source, not .mm mask logic. Same-width source/destination overlap is allowed; equal sources read equal initial values.
vs1 supplies the same-lane SEW-wide second OR source.
Group starts align to EMUL, with EMUL≤8; masked vd cannot contain v0. When v0 supplies the EEW=1 execution mask, it cannot also supply SEW source data.
Require V 1.0, enabled vector state and valid supported vtype. Active body satisfies vstart≤i<vl with mask enabled; prestart is unchanged and inactive/tail follow vma/vta. vstart≥vl (including vl=0) updates no destination elements. Masked vd cannot contain v0, which cannot supply both mask and data.
VVector IntegerBitwise

Instruction Behavior

RISC-V VOR.VV uses OP-V encoding and computes vs2 | the second source for each active element, writing vd. The second source is the corresponding element of vector register vs1; with vm=0, v0.t controls participating elements.

VOR.VV Decode And Execute Animation

Starts from OP-V encoding fields, then shows how VOR applies SEW-width bitwise OR to active elements and writes vd.

Instruction input
vor.vv
Execution Context

The teaching model fixes LMUL=m1 and vstart=0 and shows only body elements in the selected VL. It fixes VLEN=4096, VLMAX=4096/16=256, and assumes support for the selected SEW; equal vector sources require equal elements. In ordinary masked forms, inactive and tail elements follow vtype.vma/vta and the result row does not invent a definite value; VADC/VMADC/VSBC/VMSBC execute every body element, with v0 bits used only as carry/borrow-in.

OP-V encodingvor.vv
funct6
001010
vm
0
vs2
01000
vs1
01100
funct3
000
vd
00100
opcode
1010111
lane
0
1
2
3
4
5
6
7
v8
0x00fa
0x010b
0x011c
0x012d
0x013e
0x014f
0x0160
0x0171
|
|
|
|
|
|
|
|
v12
0x000d
0x0016
0x001f
0x0028
0x0031
0x003a
0x0043
0x004c
v0.t
1
0
1
1
1
0
1
1
v4
...
-
...
...
...
-
...
...
Current step

Show OP-V 32-bit encoding fields

vor.vv uses OP-V encoding. The animation places fixed fields, register fields, vm, and the vs1 field in one encoding strip.

This animation shows only ISA-visible relationships from the official V extension: OP-V field decode, active-element reads, SEW-width integer bitwise OR, mask control, and vd writeback. It does not model pipelines, caches, or timing.

Quick Understanding & Search Notes

VOR.VV is a V-extension single-width integer logical instruction: within vl, active elements compute vs2 | the second source, keep the SEW-bit result, and write ordinary vector register vd.

The OP-V opcode is 1010111. VOR.VV uses funct6=001010, and the .vv form uses funct3=000.
The VV form reads the second vector source element from vs1 for each lane.
Only body active elements execute; with vm=0, elements selected by v0.t participate, while masked-off and tail elements follow the current vma/vta policies.
The result is an ordinary SEW-width integer bit pattern, not a one-bit-per-element destination mask.

Vector Execution Context

Syntax: vor.vv vd, vs2, vs1[, v0.t]; omit v0.t for vm=1, include it for vm=0. 32-bit OP-V: opcode=1010111, funct6=001010, funct3=000.

vd, vs2 and a vector second source are ordinary SEW/LMUL groups. Active elements compute vs2[i] | second source, not .mm mask logic. Same-width source/destination overlap is allowed; equal sources read equal initial values.

vs1 supplies the same-lane SEW-wide second OR source.

Group starts align to EMUL, with EMUL≤8; masked vd cannot contain v0. When v0 supplies the EEW=1 execution mask, it cannot also supply SEW source data.

Require V 1.0, enabled vector state and valid supported vtype. Active body satisfies vstart≤i<vl with mask enabled; prestart is unchanged and inactive/tail follow vma/vta. vstart≥vl (including vl=0) updates no destination elements. Masked vd cannot contain v0, which cannot supply both mask and data.

The RISC-V Instruction Set Manual, Volume I: Unprivileged Architecture — Version 20260120, Chapter 31

Common Usage Scenarios

setting selected bits, combining bit fields, or merging per-element data bit patterns

Assume enabled V/VS, valid m1, VLEN≥128, supported operand widths, vl=4, vstart=0, v0.mask[0..3]=1111 and initialized sources. a0=4, SEW=16, v8=[250,267,284,301], v12=[13,22,31,40] → v4=[255,287,287,301]. Bitwise OR keeps SEW bits. Inactive/tail follow policy without assumed zeroing.

RVV per-element bit operations

Assume enabled V/VS, valid m1, VLEN≥128, supported operand widths, vl=4, vstart=0, v0.mask[0..3]=1111 and initialized sources. a0=4, SEW=16, v8=[250,267,284,301], v12=[13,22,31,40] → v4=[255,287,287,301]. Bitwise OR keeps SEW bits. Inactive/tail follow policy without assumed zeroing.

Pre-Use Checklist

Syntax Check
  • Syntax: vor.vv vd, vs2, vs1[, v0.t]; omit v0.t for vm=1, include it for vm=0. 32-bit OP-V: opcode=1010111, funct6=001010, funct3=000.
  • vd, vs2 and a vector second source are ordinary SEW/LMUL groups. Active elements compute vs2[i] | second source, not .mm mask logic. Same-width source/destination overlap is allowed; equal sources read equal initial values.
Semantic Check
  • vs1 supplies the same-lane SEW-wide second OR source.
  • Group starts align to EMUL, with EMUL≤8; masked vd cannot contain v0. When v0 supplies the EEW=1 execution mask, it cannot also supply SEW source data.
  • Require V 1.0, enabled vector state and valid supported vtype. Active body satisfies vstart≤i<vl with mask enabled; prestart is unchanged and inactive/tail follow vma/vta. vstart≥vl (including vl=0) updates no destination elements. Masked vd cannot contain v0, which cannot supply both mask and data.

Pitfalls / Common Confusions

VOR.VV writes ordinary vector elements. It does not produce a comparison mask and is not the same as VMOR.MM mask-register logic.
The related VI form uses a 5-bit signed immediate in -16..15; larger constants normally come from an integer register through the .vx form.
Masked-off and tail elements follow the current vtype vma/vta policies; do not assume fixed zeroing or fixed preservation.

FAQ

Does VOR.VV produce a vector mask?

No. VOR.VV writes ordinary vector elements; compare instructions produce mask results, and mask-register logic uses .mm instructions.

What determines the element width for VOR.VV?

The current vtype SEW determines element width; body elements satisfy vstart≤i<vl. Element width and execution range are different concepts.

How does VOR.VV handle v0.t zero bits when vm=0?

Those elements do not execute this logical operation. The destination element follows the current mask policy, so the mnemonic does not imply a fixed zero result.