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

Zero-extend variants of vmv.x.s and vmv.s.x #388

Open
gsauthof opened this issue Feb 29, 2020 · 1 comment
Open

Zero-extend variants of vmv.x.s and vmv.s.x #388

gsauthof opened this issue Feb 29, 2020 · 1 comment
Labels
Resolve after v1.0 Does not need to be resolved for v1.0 draft

Comments

@gsauthof
Copy link
Contributor

It looks a bit asymmetric that there are instruction for loading and zero-extending values from memory (for vector and non-vector loads) but when moving the first vector element it's always sign-extended.

For example, to move the first vector element into a scalar register without sign-extending it one has to mask the superfluous sign-bits again, e.g.:

vmv.x.s a5, v24
andi    a5, a5, 0xff

There was issue #254 - but from reading the discussion there I'm not sure if adding zero-extending variants of vmv.x.s/vmv.s.x is already off the table.

Adding those zero-extending variants would make some programs a bit shorter and arguably the instruction set more symmetric/less surprising.

@solomatnikov
Copy link

FYI: there is a discussion to remove sign and zero extending vector loads from the spec:

#362

People generally agree that they should be removed and fractional LMUL should be added to mitigate:

#382

@kasanovic kasanovic added the Resolve after v1.0 Does not need to be resolved for v1.0 draft label Jun 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolve after v1.0 Does not need to be resolved for v1.0 draft
Projects
None yet
Development

No branches or pull requests

3 participants