What is rs2 in VSETVL?
rs2 holds the full vtype value, including vill, vma, vta, vsew, and vlmul bits; it is not the textual immediate used by vsetvli.
Set vl/vtype using register AVL and vtype.
VSETVL uses opcode 1010111 (0x57), funct3 111. The rs1 and rs2 fields select the two source registers, and rd selects the destination register.
VSETVL selects new vl and vtype from AVL in rs1 and a vtype value in rs2, then writes the new vl to rd.
VSETVL is an RVV configuration instruction that determines vl and vtype for following vector instructions.
Understand this scenario with real code like «vsetvl t0, a0, a1».
Understand this scenario with real code like «vsetvl t0, a0, a1».
rs2 holds the full vtype value, including vill, vma, vta, vsew, and vlmul bits; it is not the textual immediate used by vsetvli.