-
Notifications
You must be signed in to change notification settings - Fork 244
Add support for the Zalasr extension #328
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
base: master
Are you sure you want to change the base?
Conversation
|
The new file is a slightly modifed copy of the (old version of) LOAD/STORE, can't you call those functions instead and make the alignment check mandatory (since al==true) rather than dependent on plat_enable_misaligned_access()? |
|
I tried to match what was done in the A extension (for load-reserved and store-conditional). Should I change this to use LOAD/STORE (and add a new parameter to force alignment checks) instead? |
22ac084 to
091f6fa
Compare
|
I've upgraded it to be based on the most recent load and store invocations. I added tests from riscv-software-src/riscv-tests#562. Spec is now at https://github.com/riscv/riscv-zalasr |
|
I think we also shouldn't be checking in binary ELFs anymore either. We finally have some infrastructure for first party tests but I guess if we want something from newer versions of riscv-tests we should update it (without checking in ELFs). It's on the roadmap. |
Are you sure? This would result in Zalasr being untested in the checkin. This already caught an issue where I didn't upgrade the cmakelists properly, only the Makefile. |
|
This PR brings up an interesting question about how to handle extensions that aren't ratified yet. I think that generally the golden model should not have features that are not officially in the spec yet. I can think of two possible approaches to this:
|
Is it possible to check in an assembly or C file that can be used for testing instead? Or is support for this extension not yet in upstream compilers. Also, the extension needs to be added to the list of supported extensions in the README. |
We could check in the test files I introduce in riscv-software-src/riscv-tests#562 (which these are derived from), although you need a recent version of LLVM (19 or later) for asm support. This would also be contrary to what the other tests in that directory do (they are raw elf files). I've added the note in the README.
The easiest thing to do is probably to hold off on merging until it is ratified, if you would like to do so let me know. |
|
@mehnadnerd Now that the |
|
I also think we should update the riscv-tests to build from source and then we can update to the latest version. If it requires a recent Clang, so be it. It's easy to install. |
|
I think i'm going to wait for the extension to be officially approval to try to merge, so we don't have to do the dance of merging it twice, once now and once when it is approved. |
|
Looks like this extension has been officially approved by the TSC and is just pending board approval for ratification. It would be good to get this updated and merged. |
Adds support for the Zalasr extension. Documentation on that is available at https://github.com/riscv/riscv-zalasr