-
Notifications
You must be signed in to change notification settings - Fork 751
Description
The Vector chapter seems a bit inconsistent about writing to elements with indices less than vstart
, especially when vstart >= vl
.
First, you have to start at vstart
:
All vector instructions are defined to begin execution with the element number given in the vstart CSR, leaving earlier elements in the destination vector undisturbed
But sometimes you don't:
Except where noted above, vector instructions are allowed to overwrite their inputs, and so in most cases, the vector instruction restart must be from the vstart element index. However, there are a number of cases where this overwrite is prohibited to enable execution of the vector instructions to be idempotent and hence restartable from an earlier index location.
Then, there's a general condition that you don't do anything if vstart >= vl
:
When vstart ≥ vl, there are no body elements, and no elements are updated in any destination vector register group, including that no tail elements are updated with agnostic values.
For whole register vector move instructions it's evl
instead of vl
, but does that mean if vstart>=evl
then you can't do the vector move, but if vstart=evl-1
then you can do the entire vector move ignoring the exact value of vstart
?
That seems really weird. Surely the intent of this instruction is that it can be handled in the renamer without having to worry about vstart
?
The spec could really do with some RFC-style MUST
s in here to make it obvious if it is intentional, and probably some note explaining why. I don't really see why you shouldn't be allowed to do the whole vector register move irrespective of the vstart
value.