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

Adding Zalasr #201

Merged
merged 3 commits into from
Oct 21, 2023
Merged

Adding Zalasr #201

merged 3 commits into from
Oct 21, 2023

Conversation

mehnadnerd
Copy link

Adding load-acquire/store-release. Note they are written here as lb. for the load-acquire byte (so lb.aq and lb.aqrl), I'm not sure that will work but it passes the tests here.

@codecov-commenter
Copy link

codecov-commenter commented Oct 10, 2023

Codecov Report

Merging #201 (ce0312a) into master (19e3ddc) will not change coverage.
The diff coverage is n/a.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

@@           Coverage Diff           @@
##           master     #201   +/-   ##
=======================================
  Coverage   92.83%   92.83%           
=======================================
  Files           3        3           
  Lines         642      642           
=======================================
  Hits          596      596           
  Misses         46       46           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@aswaterman
Copy link
Member

I get the strategy, but I can guarantee it'll cause some confusion :-) Let's see if it works out in Spike, Binutils, etc.

brs added 2 commits October 18, 2023 19:10
…` for the load-acquire byte (so `lb.aq` and `lb.aqrl`), I'm not sure that will work but it passes the tests here.
@mehnadnerd
Copy link
Author

I've updated it so it now uses lb.aq and sb.rl as the "base" names. I've got it working in Spike (https://github.com/mehnadnerd/riscv-isa-sim/tree/zalasr). I'm planning to do LLVM support next.

@aswaterman
Copy link
Member

Thanks, Brendan. I’ll take a look at the Spike PR later this week.

@aswaterman
Copy link
Member

Thinking about this some more, maybe consider adding back the lb. versions with aq and rl as args, but as pseudo-ops? Implementations will want to decode them that way and, by happenstance, treat the other reserved aq/rl combinations the same way that LR/SC currently do. Having these generic versions in the decode table facilitates that implementation style.

@mehnadnerd
Copy link
Author

Hmm, I think that will still have the confusion you mentioned. I'm also worried that people might choose to ignore the acquire bit for load-acquire, which would ruin compatibility for a future load-release.

@aswaterman
Copy link
Member

Fair enough. Implementers are obviously still free to do what they will with a reserved encoding.

@aswaterman aswaterman merged commit f9ed144 into riscv:master Oct 21, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants