Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

When vl=0, will scalar (non-vector) destination register be updated? #284

Closed
chuanhua opened this issue Sep 4, 2019 · 2 comments · Fixed by #288
Closed

When vl=0, will scalar (non-vector) destination register be updated? #284

chuanhua opened this issue Sep 4, 2019 · 2 comments · Fixed by #288

Comments

@chuanhua
Copy link
Contributor

chuanhua commented Sep 4, 2019

In section 3.3, a note states that

As a consequence, when vl=0, no elements are updated in the destination vector
register group, regardless of vstart.

This only talks about destination vector registers. What is the correct behavior if the destination register is a scalar (non-vector) register? For example, vmv.x.s, vfmv.f.s, vpopc.m, vfirst.m instructions?

@aswaterman
Copy link
Member

By being silent on the matter, the spec implies that the scalar destination register is always written. We should add a note to that effect (but there's no need for additional normative text).

This definition simplifies designs with scalar register renaming, and seems to be neutral for designs without.

The value written is unambiguous: vmv.x.s and vfmv.f.s copy element 0 (regardless of vl), and for the mask ops, there are no active elements, so e.g. vfirst.m returns -1 and vpopc.m returns 0.

@chuanhua
Copy link
Contributor Author

chuanhua commented Sep 6, 2019

It would be great if you could add such notes at the locations where each such instruction is being described. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants