public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug libgcc/108891] New: libatomic: AArch64 SEQ_CST 16-byte load missing barrier @ 2023-02-22 18:48 wilco at gcc dot gnu.org 2023-02-23 22:13 ` [Bug libgcc/108891] " wilco at gcc dot gnu.org ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: wilco at gcc dot gnu.org @ 2023-02-22 18:48 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108891 Bug ID: 108891 Summary: libatomic: AArch64 SEQ_CST 16-byte load missing barrier Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libgcc Assignee: unassigned at gcc dot gnu.org Reporter: wilco at gcc dot gnu.org Target Milestone: --- LSE2 uses the following sequence for a 16-byte atomic load: ldp res0, res1, [x0] dmb ish The AArch64 memory model allows the LDP to be reordered with an earlier STLXP (eg. a SEQ_CST exchange), thus breaking SEQ_CST ordering. To avoid this, atomic loads need a barrier before the LDP - either DBM ISHLD or LDAR works. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libgcc/108891] libatomic: AArch64 SEQ_CST 16-byte load missing barrier 2023-02-22 18:48 [Bug libgcc/108891] New: libatomic: AArch64 SEQ_CST 16-byte load missing barrier wilco at gcc dot gnu.org @ 2023-02-23 22:13 ` wilco at gcc dot gnu.org 2023-03-24 16:51 ` cvs-commit at gcc dot gnu.org 2023-03-24 16:53 ` wilco at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: wilco at gcc dot gnu.org @ 2023-02-23 22:13 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108891 Wilco <wilco at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2023-02-23 Ever confirmed|0 |1 Assignee|unassigned at gcc dot gnu.org |wilco at gcc dot gnu.org ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libgcc/108891] libatomic: AArch64 SEQ_CST 16-byte load missing barrier 2023-02-22 18:48 [Bug libgcc/108891] New: libatomic: AArch64 SEQ_CST 16-byte load missing barrier wilco at gcc dot gnu.org 2023-02-23 22:13 ` [Bug libgcc/108891] " wilco at gcc dot gnu.org @ 2023-03-24 16:51 ` cvs-commit at gcc dot gnu.org 2023-03-24 16:53 ` wilco at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: cvs-commit at gcc dot gnu.org @ 2023-03-24 16:51 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108891 --- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Wilco Dijkstra <wilco@gcc.gnu.org>: https://gcc.gnu.org/g:1f641d6aba284e0c277e6684cd6b2c73591cd14d commit r13-6855-g1f641d6aba284e0c277e6684cd6b2c73591cd14d Author: Wilco Dijkstra <wilco.dijkstra@arm.com> Date: Fri Feb 10 17:41:05 2023 +0000 libatomic: Fix SEQ_CST 128-bit atomic load [PR108891] The LSE2 ifunc for 16-byte atomic load requires a barrier before the LDP - without it, it effectively has Load-AcquirePC semantics similar to LDAPR, which is less restrictive than what __ATOMIC_SEQ_CST requires. This patch fixes this and adds comments to make it easier to see which sequence is used for each case. Use a load/store exclusive loop for store to simplify testing memory ordering is correct (it is slightly faster too). libatomic/ PR libgcc/108891 * config/linux/aarch64/atomic_16.S: Fix libat_load_16_i1. Add comments describing the memory order. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libgcc/108891] libatomic: AArch64 SEQ_CST 16-byte load missing barrier 2023-02-22 18:48 [Bug libgcc/108891] New: libatomic: AArch64 SEQ_CST 16-byte load missing barrier wilco at gcc dot gnu.org 2023-02-23 22:13 ` [Bug libgcc/108891] " wilco at gcc dot gnu.org 2023-03-24 16:51 ` cvs-commit at gcc dot gnu.org @ 2023-03-24 16:53 ` wilco at gcc dot gnu.org 2 siblings, 0 replies; 4+ messages in thread From: wilco at gcc dot gnu.org @ 2023-03-24 16:53 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108891 Wilco <wilco at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED --- Comment #2 from Wilco <wilco at gcc dot gnu.org> --- Fixed ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-03-24 16:53 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2023-02-22 18:48 [Bug libgcc/108891] New: libatomic: AArch64 SEQ_CST 16-byte load missing barrier wilco at gcc dot gnu.org 2023-02-23 22:13 ` [Bug libgcc/108891] " wilco at gcc dot gnu.org 2023-03-24 16:51 ` cvs-commit at gcc dot gnu.org 2023-03-24 16:53 ` wilco at gcc dot gnu.org
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).