Enable win64_128bit_abi_hack for x86_64-unknown-uefi
The `x86_64-unknown-uefi` target is Windows-like [1], and requires the same altered ABI for some 128-bit integer intrinsics. See also https://github.com/rust-lang/rust/issues/86494. [1]: https://github.com/rust-lang/rust/blob/master/compiler/rustc_target/src/spec/x86_64_unknown_uefi.rs
This commit is contained in:
parent
fd3bbe49ef
commit
586e2b38ef
1 changed files with 4 additions and 4 deletions
|
|
@ -209,13 +209,13 @@ macro_rules! intrinsics {
|
|||
|
||||
$($rest:tt)*
|
||||
) => (
|
||||
#[cfg(all(windows, target_arch = "x86_64"))]
|
||||
#[cfg(all(any(windows, target_os = "uefi"), target_arch = "x86_64"))]
|
||||
$(#[$($attr)*])*
|
||||
pub extern $abi fn $name( $($argname: $ty),* ) $(-> $ret)? {
|
||||
$($body)*
|
||||
}
|
||||
|
||||
#[cfg(all(windows, target_arch = "x86_64"))]
|
||||
#[cfg(all(any(windows, target_os = "uefi"), target_arch = "x86_64"))]
|
||||
pub mod $name {
|
||||
#[cfg_attr(not(feature = "mangled-names"), no_mangle)]
|
||||
pub extern $abi fn $name( $($argname: $ty),* )
|
||||
|
|
@ -226,7 +226,7 @@ macro_rules! intrinsics {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(not(all(windows, target_arch = "x86_64")))]
|
||||
#[cfg(not(all(any(windows, target_os = "uefi"), target_arch = "x86_64")))]
|
||||
intrinsics! {
|
||||
$(#[$($attr)*])*
|
||||
pub extern $abi fn $name( $($argname: $ty),* ) $(-> $ret)? {
|
||||
|
|
@ -426,7 +426,7 @@ macro_rules! intrinsics {
|
|||
|
||||
// Hack for LLVM expectations for ABI on windows. This is used by the
|
||||
// `#[win64_128bit_abi_hack]` attribute recognized above
|
||||
#[cfg(all(windows, target_pointer_width = "64"))]
|
||||
#[cfg(all(any(windows, target_os = "uefi"), target_pointer_width = "64"))]
|
||||
pub mod win64_128bit_abi_hack {
|
||||
#[repr(simd)]
|
||||
pub struct U64x2(u64, u64);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue