riscv-v-spec
riscv-v-spec copied to clipboard
Does use of vstart values greater that the largest element index apply to vle16ff.v?
What happens if a vector load fault first instruction (e.g. vle16ff.v) is executed with vstart larger than the largest element index?
Section 3.7 says:
The use of vstart values greater than the largest element index for the current SEW setting is reserved.
This seems unconditional. It should apply to all instructions.
Section 7.7 says:
If an element > 0 raises an exception, the corresponding trap is not taken, and the vector length vl is reduced to the index of the element that would have raised an exception.
Does this statement apply to an element index that is out of bounds (larger than the largest element index)? In this case the element is not raising an exception, the instruction itself is raising an exception because vstart is out of bounds.
Does this statement apply to an element index that is out of bounds (larger than the largest element index)? In this case the element is not raising an exception, the instruction itself is raising an exception because vstart is out of bounds.
I don't think this statement apply to that scenario. There is no need to update VL if no destination elements are updated. Maybe changing the wording an element > 0 raises an exception to a body element > 0 raises an exception would be clearer.
The spec recommends taking a trap for vstart value greater than largest element index. Do we take a trap for vle16.ff.v?
For the rule of vstart value greater than largest element index, I think it applies to all vector instructions in general including fault-only-first instructions.