rustc_codegen_gcc subtree update - #162499
Conversation
This gives the asm-const code the basic ability to deal wiht pointer and provenances, which lays the ground work for asm_const_ptr. Note that `SymStatic` is not fully removed, a specialized is kept and renamed as `SymThreadLocalStatic`, for `#[thread_local]` statics where CTFE does not support naming. The `#[thread_local]` is unstable feature and it's not clear if we want to support this in `sym`, but removal of it should be a separate PR.
With the previous commit, now we can see there are some code duplication for the handling of `GlobalAlloc` inside backends. Do some clean up to unify them.
This will allow introducing a separate incr comp session dir for the post LTO artifacts in the future. In addition it statically encodes the lifetime of the incr comp session rather than requiring an enum behind a mutex stored in the Session.
Support using const pointers in asm `const` operand Implements [RFC#3848](rust-lang/rfcs#3848) with tracking issue rust-lang#128464 This adds support of const pointers for asm `const` in addition to plain integers. The inline `asm!` support is implemented using `i` constraint, and the `global_asm!` and `naked_asm!` support is implemented by inserting `symbol + offset` and make `symbol` compiler-used. For unnamed consts, it will create additional internal & hidden symbols so that they can be referenced by global_asm. ~~The feature is also implemented for GCC backend but it's untested.~~ Tested now.
…-uninit constants" This reverts commit ed9de1e.
…nathanBrouwer Rename `errors.rs` file to `diagnostics.rs` (15/N) Follow-up of rust-lang#157485. r? @JonathanBrouwer
This is already *supposed* to be impossible in layout, but this emphasizes that better. Ironically I was inspired to do this as part of looking at making `Simd<T, 0>` *work*, but importantly if that's going to happen I think it should be `BackendRepr::Memory` like other ZSTs, *not* a `BackendRepr::ScalarVector` that would need to carry around a useless LLVM value in `OperandValue::Immediate` (where it's not even clear what the LLVM type of that value would be).
Structurally prevent zero-count `BackendRepr::SimdVector`s This is already *supposed* to be impossible in layout, but this emphasizes that better. This PR makes no behaviour changes; just `BackendLaneCount` instead of `u64` in https://doc.rust-lang.org/nightly/nightly-rustc/rustc_abi/enum.BackendRepr.html Ironically I was inspired to do this as part of [looking at making `Simd<T, 0>` *work*](https://rust-lang.zulipchat.com/#narrow/channel/257879-project-portable-simd/topic/Allow.20N.3D.3D0.3F/with/613345298), but importantly if that's going to happen I think it should be `BackendRepr::Memory` like other ZSTs, *not* a `BackendRepr::ScalarVector` that would need to carry around a useless LLVM value in `OperandValue::Immediate` (where it's not even clear what the LLVM type of that value would be).
Only emit -fno-asynchronous-unwind-tables when we should not emit unwind tables
…8_04 Sync from rust 2026/08/04
…oli-obk Split IncrCompSession out of Session This will allow introducing a separate incr comp session dir for the post LTO artifacts in the future. In addition it statically encodes the lifetime of the incr comp session rather than requiring an enum behind a mutex stored in the Session. Based on rust-lang#159000 Part of rust-lang/compiler-team#908
doc/tips.md links to ./doc/gimple.md, but tips.md is itself inside doc/, so the link resolves to doc/doc/gimple.md and 404s. The file sits next to it. Readme.md links to ./doc/debugging-gcc-lto.md. That file was added in 79316d4 and removed again in 79a6e4e, which replaced it with the broader doc/debugging.md; the Readme entry was not updated. The GCC LTO material is still there, as the first section of that file. CONTRIBUTING.md already refers to it as [Debugging](doc/debugging.md), so the Readme entry now matches that name.
Remove passing tests from failing-ui-tests.txt
Fix two broken links in the docs
Adds new `zreg` register type and `SveVec*` variants to `InlineAsmType`
…O is enabled The parallel frontend makes the cookies nondeterministic in their current form, resulting in nondeterministic outputs when bitcode is emitted or LTO is used. Causes minor diagnostic regression for inline asm in release builds.
Error on stale entries in failing test files
…s, r=petrochenkov Restrict LLVM inline asm location cookie usage. Fixes rust-lang#150451 The parallel frontend makes the cookies nondeterministic in their current form, resulting in nondeterministic outputs when bitcode is emitted or LTO is used. Causes minor diagnostic regression for inline asm in release builds. See rust-lang#150451 for details. Fixes rust-lang#150451 r? bjorn3
…9_08 Sync from rust 2026/09/08
…update_cg_gcc_2026-09-08
|
cc @antoyo |
|
4d67b97 to
b47a6d4
Compare
b47a6d4 to
e6ff704
Compare
|
☔ The latest upstream changes (presumably #162631) made this pull request unmergeable. Please resolve the merge conflicts by rebasing. |
|
I don't know how git subtree will handle these changes. That being said, I'd propose to switch to Josh from the next sync, because it looks like it is finally working for |
r? antoyo