Skip to content

Commit

Permalink
Rollup merge of rust-lang#104020 - nicholasbishop:bishop-limit-efiapi…
Browse files Browse the repository at this point in the history
…, r=nagisa

Limit efiapi calling convention to supported arches

Supported architectures in UEFI are described here:
https://uefi.org/specs/UEFI/2.10/02_Overview.html#calling-conventions

rust-lang#65815
  • Loading branch information
matthiaskrgr authored Nov 6, 2022
2 parents 5731f00 + 28a1852 commit b301b37
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 b301b37

Please sign in to comment.