Sync from rust 2026/08/04 - #942
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.
Support using const pointers in asm `const` operand Implements [RFC#3848](rust-lang/rfcs#3848) with tracking issue rust-lang/rust#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 ed9de1e4663c73242710235ff343895e16a4d539.
…uwer Rename `errors.rs` file to `diagnostics.rs` (15/N) Follow-up of rust-lang/rust#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).
…2026-07-24, r=GuillaumeGomez" This reverts commit 504869653f510b279c542e65ccd1ea9710c119ba, reversing changes made to 7c329d6c76e11ca40c5673818ab0439c1be8962c.
|
Maybe because you merged master into this branch rather than the other way around? I don't know. I guess to be on the safer side you could revert the commit before merging master. |
What do you mean? The instructions say we should merge master in the branch. |
For cg_clif I always do it the other way around. I do |
Does this PR look correct to you, though? |
|
I don't know if the lack of a revert commit will be giving trouble when you sync back to rust-lang/rust. |
|
Well, I'll see that when the time comes I guess. :') For now we need to fix rust's CI first in any case. |
cc @bjorn3: Does that look correct to you?
I'm surprised I didn't need to manually revert commit 3e7fbda.
Could it have been automatically done by
git merge master?