Skip to content

Commit

Permalink
Limit efiapi calling convention to supported arches
Browse files Browse the repository at this point in the history
Supported architectures in UEFI are described here:
https://uefi.org/specs/UEFI/2.10/02_Overview.html#calling-conventions

#65815
  • Loading branch information
nicholasbishop committed Nov 5, 2022
1 parent 6b8d9dd commit 28a1852
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion compiler/rustc_target/src/spec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1941,8 +1941,10 @@ impl Target {
| PlatformIntrinsic
| Unadjusted
| Cdecl { .. }
| EfiApi
| RustCold => true,
EfiApi => {
["arm", "aarch64", "riscv32", "riscv64", "x86", "x86_64"].contains(&&self.arch[..])
}
X86Interrupt => ["x86", "x86_64"].contains(&&self.arch[..]),
Aapcs { .. } => "arm" == self.arch,
CCmseNonSecureCall => ["arm", "aarch64"].contains(&&self.arch[..]),
Expand Down

0 comments on commit 28a1852

Please sign in to comment.