rust/compiler/rustc_codegen_gcc/src
Trevor Gross 6fa6a854cd
Rollup merge of #144192 - RalfJung:atomicrmw-ptr, r=nikic
atomicrmw on pointers: move integer-pointer cast hacks into backend

Conceptually, we want to have atomic operations on pointers of the form `fn atomic_add(ptr: *mut T, offset: usize, ...)`. However, LLVM does not directly support such operations (https://github.com/llvm/llvm-project/issues/120837), so we have to cast the `offset` to a pointer somewhere.

This PR moves that hack into the LLVM backend, so that the standard library, intrinsic, and Miri all work with the conceptual operation we actually want. Hopefully, one day LLVM will gain a way to represent these operations without integer-pointer casts, and then the hack will disappear entirely.

Cc ```@nikic``` -- this is the best we can do right now, right?
Fixes https://github.com/rust-lang/rust/issues/134617
2025-08-08 14:22:44 -05:00
..
back Remove support for -Zcombine-cgu 2025-07-26 13:52:24 +00:00
intrinsic Merge commit '482e8540a1' into subtree-update_cg_gcc_2025-08-04 2025-08-04 10:49:43 +02:00
abi.rs Merge commit '4b5c44b141' into subtree-update_cg_gcc_2025-06-30 2025-06-30 16:12:42 +02:00
allocator.rs Merge commit '482e8540a1' into subtree-update_cg_gcc_2025-08-04 2025-08-04 10:49:43 +02:00
asm.rs Merge commit 'fda0bb9588' into subtree-update_cg_gcc_2025-06-18 2025-06-18 15:11:44 +02:00
attributes.rs remove rustc_attr_data_structures 2025-07-31 14:19:27 +02:00
base.rs Make predefine methods take &mut self 2025-05-28 20:55:00 +00:00
builder.rs Rollup merge of #144192 - RalfJung:atomicrmw-ptr, r=nikic 2025-08-08 14:22:44 -05:00
callee.rs remove rustc_attr_data_structures 2025-07-31 14:19:27 +02:00
common.rs Add opaque TypeId handles for CTFE 2025-07-09 16:37:11 +00:00
consts.rs Prevent name collisions with internal implementation details 2025-08-07 13:41:17 +00:00
context.rs Merge commit '4b5c44b141' into subtree-update_cg_gcc_2025-06-30 2025-06-30 16:12:42 +02:00
coverageinfo.rs Unbox and unwrap the contents of StatementKind::Coverage 2024-03-23 22:05:11 +11:00
debuginfo.rs Revert "Preserve the .debug_gdb_scripts section" 2025-08-06 18:01:07 +00:00
declare.rs Merge commit 'b7091eca6d' into subtree-update_cg_gcc_2025-06-28 2025-06-28 23:37:08 +02:00
errors.rs Implement support for explicit tail calls in the MIR block builders and the LLVM codegen backend. 2025-07-26 01:02:29 +02:00
gcc_util.rs various minor target feature cleanups 2025-06-19 10:50:03 +09:00
int.rs Merge commit '482e8540a1' into subtree-update_cg_gcc_2025-08-04 2025-08-04 10:49:43 +02:00
lib.rs Merge commit '482e8540a1' into subtree-update_cg_gcc_2025-08-04 2025-08-04 10:49:43 +02:00
mono_item.rs Merge commit 'f682d09eef' into subtree-update_cg_gcc_2025-07-18 2025-07-18 18:31:20 +02:00
type_.rs Merge commit 'fda0bb9588' into subtree-update_cg_gcc_2025-06-18 2025-06-18 15:11:44 +02:00
type_of.rs Merge commit 'fda0bb9588' into subtree-update_cg_gcc_2025-06-18 2025-06-18 15:11:44 +02:00