Does VMV.X.S execute when vl is zero?
Yes. The specification states that VMV.X.S executes even when vstart>=vl or vl=0 and transfers vs2 element 0.
Move vector element 0 into integer register rd.
VMV.X.S is a RISC-V V vector-to-scalar move instruction. It transfers one integer bit pattern from element 0 of vs2 into integer register rd; it is not a full-vector broadcast or a memory access.
Starts from OP-V field decode, reads vector element 0, and writes an integer register using the SEW/XLEN rule.
Fixed vm and vs1 fields appear only in the encoding area below; they are not assembly syntax operands.
Teaching context: VLEN=4096, selected SEW supported; LMUL and groups are ignored. VMV.X.S executes even when vl=0 or vstart>=vl.
The fixed OP-V fields identify the element-0-to-integer form: vm=1 and vs1=00000; masked vm=0 encodings are reserved.
VMV.X.S transfers only element 0 of vs2 to integer rd; it does not broadcast, access memory, or perform arithmetic. If rd is x0, the transferred result is discarded.
rd is an integer register; vs2 is a single vector register. LMUL is ignored.
32-bit OP-V: opcode=1010111, funct6=010000, funct3=010, vm=1; vs1=00000 is fixed; no v0.t operand.
Read only vs2[0]: SEW<XLEN sign-extends; SEW>XLEN takes low XLEN bits. Execute even with vl=0 or vstart≥vl; rd=x0 discards the write.
Require V 1.0, valid supported vtype and non-Off mstatus.VS; with H and virtualization V=1, vsstatus.VS must also be non-Off. Successful completion resets vstart to 0.
Assume enabled V/VS, valid m1, VLEN≥128, initialized sources and vstart=0; XLEN=64, e8, v8[0]=0x80, vl=0 → x10=0xffffffffffffff80. Successful completion resets vstart to 0.
Assume enabled V/VS, valid m1, VLEN≥128, initialized sources and vstart=0; XLEN=64, e8, v8[0]=0x80, vl=0 → x10=0xffffffffffffff80. Successful completion resets vstart to 0.
Yes. The specification states that VMV.X.S executes even when vstart>=vl or vl=0 and transfers vs2 element 0.