Fix ABI for f16 builtins on Intel Apple targets#675
Fix ABI for f16 builtins on Intel Apple targets#675tgross35 merged 2 commits intorust-lang:masterfrom
f16 builtins on Intel Apple targets#675Conversation
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,
f16is passed and returned like au16unless the builtin involvesf128. This PR adds two#[win64_128bit_abi_hack]-like attributes (#[apple_f16_arg_abi]and#[apple_f16_ret_abi]) to theintrinsicsmacro to handle this. This should fix the CI failure that's blocking rust-lang/rust#128349.