← Home

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

Encoding

313029282726252423222120191817161514131211109876543210
0100001vs200000010xd1010111

Decode variables

VariableBitsWidth
vs2[24:20]5
xd[11:7]5

Execution

VectorState state = vector_state();

# vmv.x.s copies element 0 of vs2 to xd, sign-extending to XLEN
X[xd] = $signed(V[vs2][state.sew-1:0]);

CSR[vstart].VALUE = 0;

Defined by

Zvl32b

Access

SUVSVU
AlwaysAlwaysAlwaysAlways

Version af3eaf9+cheriot.f635218

Data from the RISC-V Unified Database, copyright RISC-V International and contributors.

CHERIoT extensions from the CHERIoT specification and Sail model, copyright Microsoft and the CHERIoT Platform contributors.

This site is provided as a community resource and is NOT affiliated with nor endorsed by RISC-V International.