Use aapcs for efiapi calling convention on arm
On arm, llvm treats the C calling convention as `aapcs` on soft-float targets and `aapcs-vfp` on hard-float targets [1]. UEFI specifies in the arm calling convention that floating point extensions aren't used [2], so always translate `efiapi` to `aapcs` on arm. [1]: https://github.com/rust-lang/compiler-builtins/issues/116#issuecomment-261057422 [2]: https://uefi.org/specs/UEFI/2.10/02_Overview.html#detailed-calling-convention https://github.com/rust-lang/rust/issues/65815
This commit is contained in:
@@ -1915,6 +1915,7 @@ impl Target {
|
||||
Abi::Stdcall { unwind }
|
||||
}
|
||||
Abi::System { unwind } => Abi::C { unwind },
|
||||
Abi::EfiApi if self.arch == "arm" => Abi::Aapcs { unwind: false },
|
||||
Abi::EfiApi if self.arch == "x86_64" => Abi::Win64 { unwind: false },
|
||||
Abi::EfiApi => Abi::C { unwind: false },
|
||||
|
||||
|
||||
Reference in New Issue
Block a user