7 sv.setvl allows optional setting of both MVL and of indirectly marking
8 one of the scalar registers as being VL.
10 Unlike the majority of other CSRs, which contain status bits that change
11 behaviour, VL is closely interlinked with the instructions it affects
12 and often requires arithmetic interaction. Thus it makes more sense to
13 actually *use* one of the scalar registers *as* VL.
15 Format for Vector Configuration Instructions under OP-V major opcode:
17 | 31|30...20|19....15|14..12|11.7|6.....0| name |
18 |---|-------|--------|------|----|-------|------------|
19 | 0 | VLMAX | rs1 | 111 | rd |1010111| sv.setvl |
20 | 0 | VLMAX | 0 (x0) | 111 | rd |1010111| sv.setvl |
21 | 1 | -- | -- | 111 | -- |1010111| *reserved* |
30 // instruction fields:
32 rs1 = get_rs1_field();
33 vlmax = get_immed_field();
35 // handle illegal instruction decoding
41 if rs1 == 0 { // rs1 is x0
44 vlval = min(regs[rs1], vlmax)
53 # questions <a name="questions"></>
55 Moved to [[discussion]]