Trophy Case
Has ABI Cafe helped you find/fix a bug in your compiler? We'd love to hear!
-
x64 linux clang and gcc disagree on __int128 pass-on-stack ABI
- now fixed in both rustc and clang!
- We already knew clang and rustc disagreed because clang does a manual alignment adjustment, but we didn't seem to fully understand that the clang adjustment is actually buggy and doesn't apply to the implicit push-to-stack when passing __int128 by-val. gcc always aligns the value, even when pushing to stack, so the two desync in this case.
- This tool was written to investigate the clang-rustc issue, and helped establish that everyone agreed on the ABI on ARM64, where __int128 is essentially part of the hardware's ABI due to it showing up in the layout for saving/restoring SIMD register state. As a result, rust's libc crate now exposes typedefs for __int128 on those platforms