vmv.x.s

Vector move scalar to integer register

Copies the first element of the source vector register vs2 to the destination integer register xd, sign-extending to XLEN bits if SEW < XLEN.

This is a scalar read instruction that always reads element 0 of vs2, regardless of vstart. The vstart CSR is reset to 0 after execution.

Assembly format

vmv.x.s xd, vs2

Decode Variables

Bits<5> vs2 = $encoding[24:20];
Bits<5> xd = $encoding[11:7];

Execution

VectorState state = vector_state();
X[xd] = $signed(V[vs2][state.sew - 1:0]);
CSR[vstart].VALUE = 0;

Encoding

svg

Defining extension

Access

M

Always

Containing profiles

  • Mandatory: None

  • Optional: None