riscvarchive / riscv-v-spec

Working draft of the proposed RISC-V V vector extension
https://jira.riscv.org/browse/RVG-122
Creative Commons Attribution 4.0 International
973 stars 272 forks source link

Add clarification regarding supported index value of indexed load/stores #941

Closed troibe closed 9 months ago

troibe commented 9 months ago

In section Vector Strided Instructions it is stated that

Negative and zero strides are supported.

After implementing the strided loads I naively assumed that indexed load/stores also allow negative and zero indices. When comparing my simulator results with Spike I realized that Spike only supports zero and positive indices, which I assume is the correct implementation.

Would it be possible to add something along the lines of

Only zero and positive indices are supported.

to the Vector Indexed Instructions section?

aswaterman commented 9 months ago

I think this follows from the remark that "If the vector offset elements are narrower than XLEN, they are zero-extended to XLEN before adding to the base effective address."