public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: Patrick O'Neill <patrick@rivosinc.com>, gcc-patches@gcc.gnu.org
Cc: palmer@rivosinc.com, kito.cheng@gmail.com, david.abd@gmail.com,
	schwab@linux-m68k.org
Subject: Re: [PATCH v7] RISCV: Inline subword atomic ops
Date: Mon, 24 Apr 2023 23:52:48 -0600	[thread overview]
Message-ID: <de4f1747-7179-75e9-ccf0-43119bdab0cc@gmail.com> (raw)
In-Reply-To: <20230418214124.2446642-1-patrick@rivosinc.com>



On 4/18/23 15:41, Patrick O'Neill wrote:
> RISC-V has no support for subword atomic operations; code currently
> generates libatomic library calls.
> 
> This patch changes the default behavior to inline subword atomic calls
> (using the same logic as the existing library call).
> Behavior can be specified using the -minline-atomics and
> -mno-inline-atomics command line flags.
> 
> gcc/libgcc/config/riscv/atomic.c has the same logic implemented in asm.
> This will need to stay for backwards compatibility and the
> -mno-inline-atomics flag.
> 
> 2023-04-18 Patrick O'Neill <patrick@rivosinc.com>
> 
> 	PR target/104338
> 	* riscv-protos.h: Add helper function stubs.
> 	* riscv.cc: Add helper functions for subword masking.
> 	* riscv.opt: Add command-line flag.
> 	* sync.md: Add masking logic and inline asm for fetch_and_op,
> 	fetch_and_nand, CAS, and exchange ops.
> 	* invoke.texi: Add blurb regarding command-line flag.
> 	* inline-atomics-1.c: New test.
> 	* inline-atomics-2.c: Likewise.
> 	* inline-atomics-3.c: Likewise.
> 	* inline-atomics-4.c: Likewise.
> 	* inline-atomics-5.c: Likewise.
> 	* inline-atomics-6.c: Likewise.
> 	* inline-atomics-7.c: Likewise.
> 	* inline-atomics-8.c: Likewise.
> 	* atomic.c: Add reference to duplicate logic.
This is OK for the trunk.  I think the only question is whether or not 
you're going to contribute to GCC regularly.  If so, we should go ahead 
and get you write access so you can commit ACK's changes.  If you're not 
going to be making regular contributions, then I can go ahead and commit 
it for you.

Jeff

  parent reply	other threads:[~2023-04-25  5:52 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-21 21:58 [PATCH v4] RISC-V: Add support for inlining subword atomic operations Palmer Dabbelt
2022-09-02 10:08 ` Kito Cheng
2022-10-28 16:55   ` David Abdurachmanov
2022-11-16  3:53     ` Jeff Law
2023-04-18 14:28 ` [PATCH v5] RISCV: Inline subword atomic ops Patrick O'Neill
2023-04-18 15:06   ` Andreas Schwab
2023-04-18 16:39   ` [PATCH v6] " Patrick O'Neill
2023-04-18 20:17     ` Palmer Dabbelt
2023-04-18 21:41     ` [PATCH v7] " Patrick O'Neill
2023-04-24 17:20       ` Patrick O'Neill
2023-04-25  5:52       ` Jeff Law [this message]
2023-04-25 15:20         ` Patrick O'Neill
2023-04-26  2:27           ` Jeff Law
2023-04-26 17:01             ` [committed] " Patrick O'Neill
2023-05-02 20:34               ` Patrick O'Neill
2023-05-03  6:32                 ` Jeff Law
2023-05-03  9:49                   ` Richard Biener
2023-05-03 14:14                     ` Palmer Dabbelt
2023-05-03 15:13                       ` Jeff Law
2023-05-03 15:33                         ` Palmer Dabbelt
2023-05-03 16:13                           ` Patrick O'Neill
2023-04-18 16:59   ` [PATCH v5] " Jeff Law
2023-04-18 20:48     ` Patrick O'Neill
2023-04-18 21:04       ` Jeff Law

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=de4f1747-7179-75e9-ccf0-43119bdab0cc@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=david.abd@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=kito.cheng@gmail.com \
    --cc=palmer@rivosinc.com \
    --cc=patrick@rivosinc.com \
    --cc=schwab@linux-m68k.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).