[Bug target/118280] [14/15/16 Regression] __atomic_test_and_set in Microblaze are broken (exposed by r14-4286)

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Sep 20 20:51:53 GMT 2025


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118280

--- Comment #31 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Michael Eager
<eager@gcc.gnu.org>:

https://gcc.gnu.org/g:1e1d395e7913cae614de85df5d1a26b08125130f

commit r14-12035-g1e1d395e7913cae614de85df5d1a26b08125130f
Author: Michael Eager <eager@eagercon.com>
Date:   Fri Sep 19 09:53:28 2025 -0700

    [MicroBlaze][PR target/118280] Fix __atomic_test_and_set

    Atomic support enhanced to fix existing atomic_compare_and_swapsi pattern
    to handle side effects; new patterns atomic_fetch_op and
atomic_test_and_set
    added. As MicroBlaze has no QImode test/set instruction, use shift magic
    to implement atomic_test_and_set.

            PR target/118280
    gcc/
            * config/microblaze/iterators.md: New.
            * config/microblaze/microblaze-protos.h: Add
            microblaze_subword_address.
            * config/microblaze/microblaze.cc: Ditto.
            * config/microblaze/microblaze.md: constants: Add UNSPECV_CAS_BOOL,
            UNSPECV_CAS_MEM, UNSPECV_CAS_VAL, UNSPECV_ATOMIC_FETCH_OP
            type: add atomic
            * config/microblaze/sync.md: Add atomic_fetch_<atomic_optab>si
            atomic_test_and_set

    Signed-off-by: Kirk Meyer <kirk.meyer@sencore.com>
    Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com>
    Signed-off-by: Gopi Kumar Bulusu <gopi@sankhya.com>
    Signed-off-by: Michael Eager <eager@eagercon.com>


More information about the Gcc-bugs mailing list