diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2025-06-01 19:35:42 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-01 19:35:42 +0200 |
| commit | cf4fbc0695990a934d7100f0d70fb5d48fea5400 (patch) | |
| tree | 32ddfeb31a514fa33a6073a0d2a5d0436a7e8b7d /compiler/rustc_codegen_llvm/src/errors.rs | |
| parent | 335232d958b235c8e695ee67c7fee997917621f1 (diff) | |
| parent | be13ce341a663b61f785fea86554915ebf94c59d (diff) | |
| download | rust-cf4fbc0695990a934d7100f0d70fb5d48fea5400.tar.gz rust-cf4fbc0695990a934d7100f0d70fb5d48fea5400.zip | |
Rollup merge of #141622 - folkertdev:powerpc-va_arg, r=workingjubilee
implement `va_arg` for `powerpc` tracking issue: https://github.com/rust-lang/rust/issues/44930 The llvm `va_arg` implementation is well-known to have serious limitations. Some planned changes to rust's `VaList` make it much more likely that LLVM miscompiles `va_arg`, so this PR adds support for the various powerpc targets. Now at least the targets that `core` has explicit support for will continue to work. For `powerpc` (the 32-bit variant) this implementation also fixes a bug where only up to 20 variadic arguments were supported. Locally (with qemu), these targets now pass the tests in https://github.com/rust-lang/rust/blob/master/tests/run-make/c-link-to-rust-va-list-fn/checkrust.rs. That test does not actually run for the powerpc targets in CI though. The implementation is based on clang: - handling of big endian architectures https://github.com/llvm/llvm-project/blob/3c8089d1ea53232d5a7cdc33f0cb43ef7d6f723b/clang/lib/CodeGen/ABIInfoImpl.cpp#L191-L193 - 64-bit https://github.com/llvm/llvm-project/blob/3c8089d1ea53232d5a7cdc33f0cb43ef7d6f723b/clang/lib/CodeGen/Targets/PPC.cpp#L969 - 32-bit https://github.com/llvm/llvm-project/blob/3c8089d1ea53232d5a7cdc33f0cb43ef7d6f723b/clang/lib/CodeGen/Targets/PPC.cpp#L430 cc `@daltenty` (target maintainer) r? `@workingjubilee` `@rustbot` label: +F-c_variadic
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
