-
Notifications
You must be signed in to change notification settings - Fork 165
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
[meta] ABI deviations #305
Comments
Just a drive-by comment on this - it's clearly a post 1.0 issue. I think supporting embedded targets through a series of optional "deviations" is an interesting proposal and definitely something that should be considered. But it's not immediately obvious that the result will be better for the RISC-V ecosystem (and toolchain developers ability to deliver well tested and reliable compilers) vs defining a smaller number of specific embedded ABIs. I assume we'll be able to review as more data is available / proposals are made. |
Document for more detail proposal from IAR: https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/eabi/eabi.adoc |
Considering the interrupt stuff I came across recently: I think that we need something more powerfull. The lets consider use cases:
All of those would require custom toolchain like in WCH case for full utilization of HW stacking or working at all. Something like:
Doable by something like described here: riscvarchive/riscv-eabi-spec#12 I'm still not sure how dynamically linked code can be tracked without de-facto creating custom ABI for each exported function, that can't be changed once it starts to grow/shrink over time/patches. |
adoc/markdown turns that 80col formatting into infinitely long lines until empty newline. RAW version is a bit more readable at the moment. |
EDIT: Scratch my previous question - I'd missed that the link was to a separate branch rather than master/main. |
It's meta issue for tracking all ABI deviations.
Anders@IAR has released the first version of the proposal of EABI deviations, the full document is attached, we will use this proposal as base to start the discussion.
Background
A question about an embedded ABI was raised in the RISC-V community.
The main reason why a separate embedded ABI was requested, was the fear that a rather high number of temporary (caller save) registers would have an intolerable impact on interrupt functions.
An EABI task group was formed to sort it out, but it turned out that the problem was more complex than anticipated. Later on the work in the EABI TG was transferred to the psABI TG, and the EWRISCV team at IAR Systems AB was appointed to investigate how an ABI for embedded applications should be designed.
The IAR investigation
We have concluded that an embedded ABI in a traditional sense should not be needed. A separate EABI (with fewer temporary registers) would result in both slower and larger regular code, and the problem with many temporary registers for interrupt functions can be handled.
By offering a set of deviations from a main ABI, all of the needs for embedded applications can be fulfilled.
The main objectives in our work have been:
guideline in our work. The RISC-V architecture will probably be used for at least 50+ years to come, so the future must be our guideline.
or dirty fixes are allowed!
What is the process?
What is ABI deviation?
Each ABI deviation means an option of ABI design, so that users could pick up the best deviation combination for their own embedded application.
Deviation
The text was updated successfully, but these errors were encountered: