Rollup merge of #104020 - nicholasbishop:bishop-limit-efiapi, 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

https://github.com/rust-lang/rust/issues/65815
This commit is contained in:
Manish Goregaokar 2022-11-09 15:39:05 -05:00 committed by GitHub
commit bfd637a3cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 130 additions and 100 deletions

View file

@ -1937,8 +1937,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[..]),