public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/104338] RISC-V: Subword atomics result in library calls Date: Wed, 26 Apr 2023 16:55:31 +0000 [thread overview] Message-ID: <bug-104338-4-2pGr3TkeBw@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-104338-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104338 --- Comment #15 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Patrick O'Neill <poneill@gcc.gnu.org>: https://gcc.gnu.org/g:f797260adaf52bee0ec0e16190bbefbe1bfc3692 commit r14-269-gf797260adaf52bee0ec0e16190bbefbe1bfc3692 Author: Patrick O'Neill <patrick@rivosinc.com> Date: Tue Apr 18 14:33:13 2023 -0700 RISCV: Inline subword atomic ops 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> gcc/ChangeLog: PR target/104338 * config/riscv/riscv-protos.h: Add helper function stubs. * config/riscv/riscv.cc: Add helper functions for subword masking. * config/riscv/riscv.opt: Add command-line flag. * config/riscv/sync.md: Add masking logic and inline asm for fetch_and_op, fetch_and_nand, CAS, and exchange ops. * doc/invoke.texi: Add blurb regarding command-line flag. libgcc/ChangeLog: PR target/104338 * config/riscv/atomic.c: Add reference to duplicate logic. gcc/testsuite/ChangeLog: PR target/104338 * gcc.target/riscv/inline-atomics-1.c: New test. * gcc.target/riscv/inline-atomics-2.c: New test. * gcc.target/riscv/inline-atomics-3.c: New test. * gcc.target/riscv/inline-atomics-4.c: New test. * gcc.target/riscv/inline-atomics-5.c: New test. * gcc.target/riscv/inline-atomics-6.c: New test. * gcc.target/riscv/inline-atomics-7.c: New test. * gcc.target/riscv/inline-atomics-8.c: New test. Signed-off-by: Patrick O'Neill <patrick@rivosinc.com> Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
next prev parent reply other threads:[~2023-04-26 16:55 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-02-01 23:36 [Bug target/104338] New: " palmer at gcc dot gnu.org 2022-02-01 23:41 ` [Bug target/104338] " pinskia at gcc dot gnu.org 2022-02-01 23:41 ` patrick at rivosinc dot com 2022-02-01 23:41 ` pinskia at gcc dot gnu.org 2022-02-02 8:48 ` schwab@linux-m68k.org 2022-02-08 1:08 ` patrick at rivosinc dot com 2022-04-07 14:50 ` i at rvalue dot moe 2022-04-07 14:57 ` palmer at gcc dot gnu.org 2022-04-07 18:29 ` palmer at gcc dot gnu.org 2022-04-08 3:03 ` c141028 at gmail dot com 2022-04-19 17:25 ` patrick at rivosinc dot com 2022-04-19 17:48 ` redi at gcc dot gnu.org 2022-08-16 20:36 ` aurelien at aurel32 dot net 2023-01-26 22:50 ` pinskia at gcc dot gnu.org 2023-01-26 23:30 ` palmer at gcc dot gnu.org 2023-04-12 14:15 ` burnus at gcc dot gnu.org 2023-04-20 16:44 ` patrick at rivosinc dot com 2023-04-26 16:55 ` cvs-commit at gcc dot gnu.org [this message] 2023-05-16 17:00 ` cvs-commit at gcc dot gnu.org 2023-05-16 17:04 ` patrick at rivosinc dot com 2023-05-16 19:37 ` aurelien at aurel32 dot net 2023-05-16 19:42 ` i at rvalue dot moe 2023-05-16 20:05 ` palmer at gcc dot gnu.org 2023-10-05 8:47 ` redi at gcc dot gnu.org
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=bug-104338-4-2pGr3TkeBw@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@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: linkBe 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).