VMV.V.X

RISC-V VMV.V.X Instruction Details

Instruction ManualOPIVX

Broadcasts integer scalar rs1 to vd body elements as an unmasked vector move.

Instruction Syntax

vmv.v.x vd, rs1
Operand Breakdown
vd: destination vector register group.
Source operand: from a vector register or integer register depending on the form.
VMV is an unmasked move/broadcast form; use VMERGE for selection under v0.
VVector Data MovementScalar-Vector Transfer

Instruction Behavior

VMV.V.X is an unmasked vector integer move form in the RISC-V V extension. It broadcasts integer scalar rs1 to vd body elements; the encoding fixes vm=1 and vs2=v0, and the syntax has no v0.t execution mask.

VMV.V.X Decode And Execute Animation

Starts from OP-V encoding fields, then shows how the unmasked VMV.V move form writes the current source value into vd body elements.

Instruction input
vmv.v.x
vs2
v0
fixed encoding field, not a syntax operand
vm
1
unmasked move form
OP-V encodingvmv.v.x
funct6
010111
vm
1
vs2
00000
rs1
01011
funct3
100
vd
00100
opcode
1010111
lane
0
1
2
3
4
5
6
7
copy
copy
copy
copy
copy
copy
copy
copy
x11
0x0055
0x0055
0x0055
0x0055
0x0055
0x0055
0x0055
0x0055
active
1
1
1
1
1
1
1
1
v4
...
...
...
...
...
...
...
...
Current step

Show OP-V 32-bit encoding fields

vmv.v.x uses OP-V encoding. The animation places fixed fields, register fields, vm, and the rs1 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 broadcast, fixed unmasked move, and vd writeback. It does not model pipelines, caches, or timing.

Quick Understanding & Search Notes

VMV.V.X is an unmasked VMV.V scalar broadcast form that broadcasts the SEW-width value formed from x[rs1] by the .vx rule to vd body elements. It performs no arithmetic and no memory access.

This page follows the official RISC-V V extension: vector instructions operate on body elements within the current vl. SEW, LMUL, tail policy, and mask policy come from the current vtype, usually set by vsetvli, vsetivli, or vsetvl.
VMV.V is an unmasked move form with encoding vm=1 and vs2=v0.
The source operand is integer scalar rs1; the result is broadcast to vd body elements within the current vl.
VMV.V performs no arithmetic, reads no memory, and does not use v0.t to select a subset of body elements.

Vector Execution Context

When reading VMV.V.X, do not stop at the mnemonic. Official V-extension semantics also depend on the current vl, vtype, and mask state. The suffix and operand form determine whether sources are vector, scalar, or immediate values.

Check vl first

The current vl determines the number of body elements. Typical code executes vsetvli, vsetivli, or vsetvl before this instruction.

Then check vtype

The current vtype supplies SEW, LMUL, tail policy, and mask policy; these affect element width, register-group size, and inactive/tail destination elements.

Then check vm/v0

For ordinary vector instructions with vm, vm=0 uses v0 as the execution mask and vm=1 is unmasked. A few forms such as VMERGE use v0 as data-selection input.

Official source: RISC-V V Standard Extension for Vector Operations

Common Usage Scenarios

Vector Init

Understand this scenario with real code like «vmv.v.x v1, t0 # broadcast scalar t0 to body elements».

Reduction Result

Understand this scenario with real code like «vmv.v.x v1, t0 # broadcast scalar t0 to body elements».

Pre-Use Checklist

Syntax Check
  • Confirm the current instruction format is OPIVX.
  • 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

VMV.V is an unmasked move form, and the syntax has no v0.t.
The encoding fixes vs2=v0 and vm=1; do not interpret it as conditional execution under v0.
Tail elements still follow the current tail policy.

FAQ

Can VMV.V.X take v0.t?

No. VMV.V is an unmasked move form; use VMERGE when conditional selection under v0 is required.

Does VMV.V.X access memory or perform arithmetic?

No. It only broadcasts bit patterns through registers and current body elements.