Skip to content

Commit 0c738b5

Browse files
authored
Merge pull request #486 from nicholasbishop/bishop-uefi-unadjusted-win64-4
2 parents 8672395 + 41e1ac6 commit 0c738b5

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/float/conv.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@ intrinsics! {
9292
f64::from_bits(int_to_float::u64_to_f64_bits(i))
9393
}
9494

95-
#[cfg_attr(not(target_feature = "llvm14-builtins-abi"), unadjusted_on_win64)]
95+
#[cfg_attr(any(not(target_feature = "llvm14-builtins-abi"), target_os = "uefi"), unadjusted_on_win64)]
9696
pub extern "C" fn __floatuntisf(i: u128) -> f32 {
9797
f32::from_bits(int_to_float::u128_to_f32_bits(i))
9898
}
9999

100-
#[cfg_attr(not(target_feature = "llvm14-builtins-abi"), unadjusted_on_win64)]
100+
#[cfg_attr(any(not(target_feature = "llvm14-builtins-abi"), target_os = "uefi"), unadjusted_on_win64)]
101101
pub extern "C" fn __floatuntidf(i: u128) -> f64 {
102102
f64::from_bits(int_to_float::u128_to_f64_bits(i))
103103
}
@@ -129,13 +129,13 @@ intrinsics! {
129129
f64::from_bits(int_to_float::u64_to_f64_bits(i.unsigned_abs()) | sign_bit)
130130
}
131131

132-
#[cfg_attr(not(target_feature = "llvm14-builtins-abi"), unadjusted_on_win64)]
132+
#[cfg_attr(any(not(target_feature = "llvm14-builtins-abi"), target_os = "uefi"), unadjusted_on_win64)]
133133
pub extern "C" fn __floattisf(i: i128) -> f32 {
134134
let sign_bit = ((i >> 127) as u32) << 31;
135135
f32::from_bits(int_to_float::u128_to_f32_bits(i.unsigned_abs()) | sign_bit)
136136
}
137137

138-
#[cfg_attr(not(target_feature = "llvm14-builtins-abi"), unadjusted_on_win64)]
138+
#[cfg_attr(any(not(target_feature = "llvm14-builtins-abi"), target_os = "uefi"), unadjusted_on_win64)]
139139
pub extern "C" fn __floattidf(i: i128) -> f64 {
140140
let sign_bit = ((i >> 127) as u64) << 63;
141141
f64::from_bits(int_to_float::u128_to_f64_bits(i.unsigned_abs()) | sign_bit)

src/macros.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,15 +174,15 @@ macro_rules! intrinsics {
174174

175175
$($rest:tt)*
176176
) => (
177-
#[cfg(all(windows, target_pointer_width = "64"))]
177+
#[cfg(all(any(windows, all(target_os = "uefi", target_arch = "x86_64")), target_pointer_width = "64"))]
178178
intrinsics! {
179179
$(#[$($attr)*])*
180180
pub extern "unadjusted" fn $name( $($argname: $ty),* ) $(-> $ret)? {
181181
$($body)*
182182
}
183183
}
184184

185-
#[cfg(not(all(windows, target_pointer_width = "64")))]
185+
#[cfg(not(all(any(windows, all(target_os = "uefi", target_arch = "x86_64")), target_pointer_width = "64")))]
186186
intrinsics! {
187187
$(#[$($attr)*])*
188188
pub extern $abi fn $name( $($argname: $ty),* ) $(-> $ret)? {

0 commit comments

Comments
 (0)