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/114130] [11 Regression] RISC-V: `__atomic_compare_exchange` does not use sign-extended value for RV64 Date: Fri, 12 Apr 2024 08:06:02 +0000 [thread overview] Message-ID: <bug-114130-4-OLzkFdRsw1@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-114130-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114130 --- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Kito Cheng <kito@gcc.gnu.org>: https://gcc.gnu.org/g:cb68221c59e8f98e107bb5842d319bee3a66b8dc commit r11-11317-gcb68221c59e8f98e107bb5842d319bee3a66b8dc Author: Kito Cheng <kito.cheng@sifive.com> Date: Wed Feb 28 16:01:52 2024 +0800 RISC-V: Fix __atomic_compare_exchange with 32 bit value on RV64 atomic_compare_and_swapsi will use lr.w to do obtain the original value, which sign extends to DI. RV64 only has DI comparisons, so we also need to sign extend the expected value to DI as otherwise the comparison will fail when the expected value has the 32nd bit set. gcc/ChangeLog: PR target/114130 * config/riscv/sync.md (atomic_compare_and_swap<mode>): Sign extend the expected value if needed. gcc/testsuite/ChangeLog: * gcc.target/riscv/pr114130.c: New. Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com> (cherry picked from commit fd07a29e39f5347d6cef3e7042a32306f97a1719)
next prev parent reply other threads:[~2024-04-12 8:06 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-02-27 13:42 [Bug target/114130] New: RISC-V: `__atomic_compare_exchange` does not use sign-extended value x at maxxsoft dot net 2024-02-28 5:14 ` [Bug target/114130] " pinskia at gcc dot gnu.org 2024-02-28 8:01 ` [Bug target/114130] [11/12/13/14 Regression] RISC-V: `__atomic_compare_exchange` does not use sign-extended value for RV64 rguenth at gcc dot gnu.org 2024-02-29 3:05 ` cvs-commit at gcc dot gnu.org 2024-04-11 1:21 ` [Bug target/114130] [11/12/13 " cvs-commit at gcc dot gnu.org 2024-04-11 6:52 ` cvs-commit at gcc dot gnu.org 2024-04-12 8:06 ` cvs-commit at gcc dot gnu.org [this message] 2024-04-12 8:06 ` [Bug target/114130] [11 " kito 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-114130-4-OLzkFdRsw1@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).