Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redundant encodings in RV32 #244

Closed
PRugg-Cap opened this issue May 9, 2024 · 0 comments · Fixed by #270
Closed

Redundant encodings in RV32 #244

PRugg-Cap opened this issue May 9, 2024 · 0 comments · Fixed by #270
Labels
enhancement New feature or request

Comments

@PRugg-Cap
Copy link
Contributor

PRugg-Cap commented May 9, 2024

@sorear raised in #40 the following:

Under RV32, any capability represented with EF=0 E=0 can also be represented using EF=1 T8=1. Should the redundant case be considered malformed?

I think it's worth having this as its own issue. It should be very simple to check for the redundant cases: since the exponent has now been negated, it just means that the maximum (right) shift is one less, which falls out nicely with the other redundant cases that result from over-shifting the bounds down.

As currently specified, I think the change would look like:
malformedLSB = (E < 0) || (xlen == 32 && E == 0) (note that this only applies if EF == 0)

It probably wouldn't be the end of the world to leave it as is, but it could lead to some confusing cases, and it's an RV32-only change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants