VMV2R.V

RISC-V VMV2R.V Instruction Details

Instruction ManualR-type

Copy a whole vector-register group of 2 registers.

Instruction Syntax

vmv2r.v vd, vs2
Operand Breakdown
Destination rd: register receiving the operation result.
Source rs1: register holding the first operand.
Source rs2: register holding the second operand.
VVector Data MovementWhole Register

Instruction Behavior

VMV2R.V copies the whole vector-register group at vs2 to vd. The copy is not element-selected by the current vl, SEW, or v0 mask, and is intended for saving, restoring, or rearranging vector register contents.

Quick Understanding & Search Notes

VMV2R.V is a whole-register move that copies the complete bit contents of 2 consecutive vector registers.

There is no vm operand; the current execution mask does not select elements.
The copy range is not determined by vl and is not interpreted element-by-element by SEW.
Destination and source register groups must satisfy the official whole-register move constraints.

Common Usage Scenarios

Compiler Shuffle

Understand this scenario with real code like «vmv2r.v v2, v0».

Context Switch

Understand this scenario with real code like «vmv2r.v v2, v0».

Pre-Use Checklist

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

Source and destination register numbers must be aligned for an NREG=2 group.
There is no vm operand; the instruction copies whole registers rather than active elements.

FAQ

Does VMV2R.V copy only active elements?

No. It copies the whole register group, not only elements active under vl or the v0 mask.