public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Thomas Schwinge <tschwinge@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc/devel/rust/master] Merge #1615
Date: Thu, 27 Oct 2022 07:50:12 +0000 (GMT)	[thread overview]
Message-ID: <20221027075012.D2BDA382A2CE@sourceware.org> (raw)

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(-)

                 reply	other threads:[~2022-10-27  7:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221027075012.D2BDA382A2CE@sourceware.org \
    --to=tschwinge@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).