-
-
Notifications
You must be signed in to change notification settings - Fork 15.4k
Don't compute FnAbi for LLVM intrinsics #160077
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
35f9fa2
707fca5
fd68ce3
e2873a0
e848978
70990da
0785a67
a457bee
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -228,16 +228,26 @@ intrinsics! { | |
| f64::from_bits(int_to_float::u64_to_f64_bits(i)) | ||
| } | ||
|
|
||
| #[cfg_attr(target_os = "uefi", unadjusted_on_win64)] | ||
| #[cfg(not(all(target_os = "uefi", target_arch = "x86_64")))] | ||
| pub extern "C" fn __floatuntisf(i: u128) -> f32 { | ||
| f32::from_bits(int_to_float::u128_to_f32_bits(i)) | ||
| } | ||
|
|
||
| #[cfg_attr(target_os = "uefi", unadjusted_on_win64)] | ||
| #[cfg(all(target_os = "uefi", target_arch = "x86_64"))] | ||
| pub extern "C" fn __floatuntisf(lo: u64, hi: u64) -> f32 { | ||
| f32::from_bits(int_to_float::u128_to_f32_bits((u128::from(hi) << 64) | u128::from(lo))) | ||
| } | ||
|
|
||
| #[cfg(not(all(target_os = "uefi", target_arch = "x86_64")))] | ||
| pub extern "C" fn __floatuntidf(i: u128) -> f64 { | ||
| f64::from_bits(int_to_float::u128_to_f64_bits(i)) | ||
| } | ||
|
|
||
| #[cfg(all(target_os = "uefi", target_arch = "x86_64"))] | ||
| pub extern "C" fn __floatuntidf(lo: u64, hi: u64) -> f64 { | ||
| f64::from_bits(int_to_float::u128_to_f64_bits((u128::from(hi) << 64) | u128::from(lo))) | ||
| } | ||
|
|
||
| #[ppc_alias = __floatunsikf] | ||
| #[cfg(f128_enabled)] | ||
| pub extern "C" fn __floatunsitf(i: u32) -> f128 { | ||
|
|
@@ -279,16 +289,26 @@ intrinsics! { | |
| int_to_float::signed(i, int_to_float::u64_to_f64_bits) | ||
| } | ||
|
|
||
| #[cfg_attr(target_os = "uefi", unadjusted_on_win64)] | ||
| #[cfg(not(all(target_os = "uefi", target_arch = "x86_64")))] | ||
| pub extern "C" fn __floattisf(i: i128) -> f32 { | ||
| int_to_float::signed(i, int_to_float::u128_to_f32_bits) | ||
| } | ||
|
|
||
| #[cfg_attr(target_os = "uefi", unadjusted_on_win64)] | ||
| #[cfg(all(target_os = "uefi", target_arch = "x86_64"))] | ||
| pub extern "C" fn __floattisf(lo: u64, hi: u64) -> f32 { | ||
| int_to_float::signed((i128::from(hi) << 64) | i128::from(lo), int_to_float::u128_to_f32_bits) | ||
| } | ||
|
|
||
| #[cfg(not(all(target_os = "uefi", target_arch = "x86_64")))] | ||
| pub extern "C" fn __floattidf(i: i128) -> f64 { | ||
| int_to_float::signed(i, int_to_float::u128_to_f64_bits) | ||
| } | ||
|
|
||
| #[cfg(all(target_os = "uefi", target_arch = "x86_64"))] | ||
| pub extern "C" fn __floattidf(lo: u64, hi: u64) -> f64 { | ||
| int_to_float::signed((i128::from(hi) << 64) | i128::from(lo), int_to_float::u128_to_f64_bits) | ||
| } | ||
|
Comment on lines
-282
to
+310
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we even need the special casing anymore? i128 has gone through some ABI changes on Windows and it doesn't look like https://github.com/llvm/llvm-project/blob/41322057c3af16d75e239ec6679c6c2bf7aec157/compiler-rt/lib/builtins/floattisf.c#L28 is doing anything special.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, they still have different ABIs: https://rust.godbolt.org/z/454nczzdr |
||
|
|
||
| #[ppc_alias = __floatsikf] | ||
| #[cfg(f128_enabled)] | ||
| pub extern "C" fn __floatsitf(i: i32) -> f128 { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.