[PATCH] D12498: X86: add an interrupt calling convention
Peter Marheine via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 3 15:52:16 PDT 2015
tari added a comment.
It's worth noting that I opted to implement this as a calling convention because it's relatively easy to support in the Rust compiler, where I really want this feature. While something similar might be useful in a C frontend as well, historically there has been no great need.
The native calling convention in Rust is deliberately unspecified, which has the result that there is no reasonably efficient way to pass exception codes into a Rust ISR- the entry and exit can be implemented in assembly (with relatively inefficient double dispatch to Rust code), but it is impossible for the programmer writing assembly to pass a parameter to a function using the Rust ABI (such as an error code placed on the stack by hardware) because it is not predictable.
Repository:
rL LLVM
http://reviews.llvm.org/D12498
More information about the llvm-commits
mailing list