-
Notifications
You must be signed in to change notification settings - Fork 218
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
Fix ABI for f16
builtins on Intel Apple targets
#675
Conversation
7def335
to
54d9376
Compare
54d9376
to
97179e4
Compare
Any clue what the history is here? Maybe Apple's docs say it defers to the psABI, which does specify both
So maybe a case could be made that the C runtime libraries should change? |
The Apple docs have this paragraph:
Which suggests the list of differences from the psABI standard is known to potentially be incomplete. Regardless, x86(-64) Apple platforms do actually follow the standard when it comes to passing and returning Given that the x86(-64) Apple codegen is specifically different from other x86(-64) platforms, it seems unlikely this difference in ABI is accidental. Discussion I've managed to find from when Unfortunately I don't personally have access to an Apple system to test this on. |
Thanks for the background. I have access to an arm64 mac, I'll try to double check this locally a bit later. There are apple systems on cfarm if you have access to that, just not x86 either https://portal.cfarm.net/machines/list/ (If you don't have access, it is pretty quick. I think I got mine in about one day. Wish I knew about it when I was doing the powerpc debugging...) |
I didn't get the chance to test this but it looks reasonable to me with everything in mind. I can't really think of a straightforward way to test this in crate, but I think we will be covered by rust-lang/rust. |
#677 should release 0.1.122. rust-lang/rust#129481 is already enqueued but rust-lang/rust can be bumped again after that, and probably enable the x86 apple tests. |
These were disabled because Apple uses a special ABI for `f16`. `compiler-builtins` merged a fix for this in [1], which has since propagated to rust-lang/rust. Enable tests since there should be no remaining issues on these platforms. [1]: rust-lang/compiler-builtins#675
Enable `f16` tests on x86 Apple platforms These were disabled because Apple uses a special ABI for `f16`. `compiler-builtins` merged a fix for this in [1], which has since propagated to rust-lang/rust. Enable tests since there should be no remaining issues on these platforms. [1]: rust-lang/compiler-builtins#675 try-job: x86_64-apple-1 try-job: x86_64-apple-2
Enable `f16` tests on x86 Apple platforms These were disabled because Apple uses a special ABI for `f16`. `compiler-builtins` merged a fix for this in [1], which has since propagated to rust-lang/rust. Enable tests since there should be no remaining issues on these platforms. [1]: rust-lang/compiler-builtins#675 try-job: x86_64-apple-1 try-job: x86_64-apple-2
These were disabled because Apple uses a special ABI for `f16`. `compiler-builtins` merged a fix for this in [1], which has since propagated to rust-lang/rust. Enable tests since there should be no remaining issues on these platforms. [1]: rust-lang/compiler-builtins#675
Enable `f16` tests on x86 Apple platforms These were disabled because Apple uses a special ABI for `f16`. `compiler-builtins` merged a fix for this in [1], which has since propagated to rust-lang/rust. Enable tests since there should be no remaining issues on these platforms. [1]: rust-lang/compiler-builtins#675 try-job: x86_64-apple-1 try-job: x86_64-apple-2
Rollup merge of rust-lang#130961 - tgross35:f16-x86-apple, r=thomcc Enable `f16` tests on x86 Apple platforms These were disabled because Apple uses a special ABI for `f16`. `compiler-builtins` merged a fix for this in [1], which has since propagated to rust-lang/rust. Enable tests since there should be no remaining issues on these platforms. [1]: rust-lang/compiler-builtins#675 try-job: x86_64-apple-1 try-job: x86_64-apple-2
For builtins on x86 (32-bit and 64-bit) Apple platforms,
f16
is passed and returned like au16
unless the builtin involvesf128
. This PR adds two#[win64_128bit_abi_hack]
-like attributes (#[apple_f16_arg_abi]
and#[apple_f16_ret_abi]
) to theintrinsics
macro to handle this. This should fix the CI failure that's blocking rust-lang/rust#128349.