From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C2C253858D37; Thu, 25 May 2023 18:30:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C2C253858D37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685039414; bh=qwW1ZTu5N/00ylLQ2vnNesSP/e1BCkTJ5Pk39mVbdXI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=M6ueiyJcsvlFg0XnGHvTqpiqAt5Y1OFKiTWrPOjdAsvhG8ZxHDhaF5j9Md/g17nAq mPUSiAaSfLvsUJcmnu1VIbR97ydNgsU8S260iRPOoVyitSC3Y+aNwfJOJVFN14Zmpl OcYwC1p3o7YQGxGmqTfSz8OFfo73yVypnHq3gw0M= From: "patrick at rivosinc dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/109933] __atomic_test_and_set is broken for BIG ENDIAN riscv targets Date: Thu, 25 May 2023 18:30:14 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.2.1 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: patrick at rivosinc dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109933 --- Comment #11 from Patrick O'Neill --- I can confirm that your fix does *not* break the testsuite on little endian. We also recently added inline subword atomics to GCC 13, will this code also need to change for big endian? Trunk: https://gcc.gnu.org/git/?p=3Dgcc.git;a=3Dblob;f=3Dgcc/config/riscv/riscv.cc= ;h=3D09fc9e5d95e611f94bc05b4851fef6f50a651c28;hb=3DHEAD#l7439 GCC-13 branch: https://gcc.gnu.org/git/?p=3Dgcc.git;a=3Dblob;f=3Dgcc/config/riscv/riscv.cc= ;h=3D5f44f6dc5c9c4ad2416e4195570473ab49c2e535;hb=3D6506590e70e57ed8d7fb68ab= 9443e31c31208fb0#l7146=