Hi gcc-patches mailing list,
0xllx0 via Sourceware Forge <[email protected]> has 
requested that the following forgejo pull request
be published on the mailing list.

Created on: 2026-05-25 19:51:08+00:00
Latest update: 2026-06-05 21:04:37+00:00
Changes: 6 changed files, 216 additions, 0 deletions
Head revision: 0xllx0/gcc-TEST ref intrinsics/atomic-exchange commit 
a42a529d91b901d3844d83476d169ea4d4202ef5
Base revision: gcc/gcc-TEST ref trunk commit 
29e4b7f1100ad3dd611da6fc3314a41978c5fc25 r17-759-g29e4b7f1100ad3
Merge base: 29e4b7f1100ad3dd611da6fc3314a41978c5fc25
Full diff url: https://forge.sourceware.org/gcc/gcc-TEST/pulls/161.diff
Discussion:  https://forge.sourceware.org/gcc/gcc-TEST/pulls/161
Requested Reviewers: cohenarthur, pinskia

Adds the `atomic_exchange` intrinsics for every memory ordering.

gcc/
        * rust/backend/rust-compile-intrinsic.cc: compile impl
        * rust/backend/rust-intrinsic-handlers.h: handler decls
        * rust/backend/rust-intrinsic-handlers.cc: handler impls
        * rust/util/rust-intrinsic-values.h: value defs

gcc/teststuite/
        * rust/execute/torture/atomic_exchange.rs: basic tests

Thanks for taking the time to contribute to GCC!

Please be advised that https://forge.sourceware.org/ is currently a trial
that is being used by the GCC community to experiment with a new workflow
based on pull requests.

Pull requests sent here may be forgotten or ignored. Patches that you want to
propose for inclusion in GCC should use the existing email-based workflow,
see https://gcc.gnu.org/contribute.html


Changed files:
- A: gcc/testsuite/rust/execute/torture/atomic_exchange.rs
- M: gcc/rust/backend/rust-compile-intrinsic.cc
- M: gcc/rust/backend/rust-compile-intrinsic.h
- M: gcc/rust/backend/rust-intrinsic-handlers.cc
- M: gcc/rust/backend/rust-intrinsic-handlers.h
- M: gcc/rust/util/rust-intrinsic-values.h


Elle Rhumsaa (5):
  gccrs: Add atomic_exchange intrinsic
  fixup: apply memmodel review suggestions
  fixup: apply rustfmt review suggestion
  fixup: change `ordering` to `model`
  fixup: follow rustc naming + memory orderings

 gcc/rust/backend/rust-compile-intrinsic.cc    |  10 ++
 gcc/rust/backend/rust-compile-intrinsic.h     |   1 +
 gcc/rust/backend/rust-intrinsic-handlers.cc   |  79 ++++++++++++
 gcc/rust/backend/rust-intrinsic-handlers.h    |   4 +
 gcc/rust/util/rust-intrinsic-values.h         |   6 +
 .../rust/execute/torture/atomic_exchange.rs   | 116 ++++++++++++++++++
 6 files changed, 216 insertions(+)
 create mode 100644 gcc/testsuite/rust/execute/torture/atomic_exchange.rs

Range-diff against v1:
1:  5130d3ff2548 = 1:  5130d3ff2548 gccrs: Add atomic_exchange intrinsic
-:  ------------ > 2:  e107576bef74 fixup: apply memmodel review suggestions
-:  ------------ > 3:  c9a1dda0add4 fixup: apply rustfmt review suggestion
-:  ------------ > 4:  a7b06b885346 fixup: change `ordering` to `model`
-:  ------------ > 5:  a42a529d91b9 fixup: follow rustc naming + memory 
orderings
-- 
2.54.0

Reply via email to