public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] Merge #1615
@ 2022-10-27  7:50 Thomas Schwinge
  0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2022-10-27  7:50 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:2bc1c5309206169776bdcab862aa2b3da7fc8c95

commit 2bc1c5309206169776bdcab862aa2b3da7fc8c95
Merge: 14c942c3eb0 4d42744aa5d
Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com>
Date:   Wed Oct 26 08:56:37 2022 +0000

    Merge #1615
    
    1615: intrinsics: Add early implementation for atomic_store_{seqcst, relaxed, release} r=CohenArthur a=CohenArthur
    
    Needs #1614 so ignore the first commit
    
    This commit adds support for three `atomic_store_*` intrinsics declared
    in the core library. The mapping is as follows:
    
    - atomic_store_seqcst(dst, val) -> __atomic_store_n(dst, val,
      __ATOMIC_SEQ_CST)
    - atomic_store_relaxed(dst, val) -> __atomic_store_n(dst, val,
      __ATOMIC_RELAXED)
    - atomic_store_release(dst, val) -> __atomic_store_n(dst, val,
      __ATOMIC_RELEASE)
    
    The one remaining question is whether `atomic_store_unordered` can be
    abstracted as an atomic store with the __ATOMIC_RELAXED ordering.
    
    This commit also performs the overloading "by hand": Replacing
    `atomic_store_release<i32>` with `__atomic_store_4` as I cannot get the
    generic version to work. This will be done in future improvements.
    
    Co-authored-by: Arthur Cohen <arthur.cohen@embecosm.com>

Diff:

 gcc/rust/backend/rust-builtins.cc                  |  36 +++++
 gcc/rust/backend/rust-builtins.h                   |   2 +-
 gcc/rust/backend/rust-compile-intrinsic.cc         | 165 ++++++++++++++++++---
 gcc/testsuite/rust/compile/torture/intrinsics-4.rs |  20 +++
 gcc/testsuite/rust/compile/torture/intrinsics-5.rs |  35 +++++
 gcc/testsuite/rust/execute/torture/atomic_store.rs |  32 ++++
 6 files changed, 268 insertions(+), 22 deletions(-)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-10-27  7:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-27  7:50 [gcc/devel/rust/master] Merge #1615 Thomas Schwinge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).