Conversation
I just learned about this `asm!` feature, which prompted me to look at whether we were using it. Not sure if some of the others were options when #381 was written, but strictly speaking arm cores are defined to follow the `AAPCS` on exception entry/exit. In practice, I _think_ `C` and `aapcs` (and the others here) are just aliases that do the same thing. Nonetheless, just in case, we should probably put the 'most correct' name here. Relevant doc: https://doc.rust-lang.org/nightly/reference/inline-assembly.html#abi-clobbers
|
Looking at that it seems like |
|
Strictly speaking, ARM cores are defined to adhere to the AAPCS on exception entry and exit. There also exists a separate specification, the C Library ABI. In practice (and for obvious reasons), these both resolve to the same base ARM ABI. Will this ever matter? Not in this century I can't imagine, the [Plus, what a shame to have a lingering |
|
There is more to this than just exception entry and exit. Yield may invoke an upcall, which has its own ABI. Currently, That ABI should match the ABI used by Yield's Also IDK if we want to touch
What exactly does this mean? Does the hardware store callee-saved registers for us? I thought the Tock kernel saves them in the grant region. |
|
This looks like it touches more things than I realized, and given that the two are almost certainly identical for the forseeable future, leaving this as
The hardware stores the caller-saved registers for us. Conceptually, ARM exception entry is a function call (adhering to the AAPCS) injected by the hardware at the point of the exception. As the hardware is the thing 'calling' the function, it has to do all the caller-saving responsibilities.
Yes, callee-saved registers the kernel stores in the |
I just learned about this
asm!feature, which prompted me to look at whether we were using it.Not sure if some of the others were options when #381 was written, but strictly speaking arm cores are defined to follow the
AAPCSon exception entry/exit. In practice, I thinkCandaapcs(and the others here) are just aliases that do the same thing. Nonetheless, just in case, we should probably put the 'most correct' name here.Relevant doc: https://doc.rust-lang.org/nightly/reference/inline-assembly.html#abi-clobbers
