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

--- Comment #1 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Wilco Dijkstra <wi...@gcc.gnu.org>:

https://gcc.gnu.org/g:d7cbcfe7c33645eaf95f175f19884d443817857b

commit r15-1036-gd7cbcfe7c33645eaf95f175f19884d443817857b
Author: Wilco Dijkstra <wilco.dijks...@arm.com>
Date:   Wed Jun 5 14:04:33 2024 +0100

    AArch64: Fix cpu features initialization [PR115342]

    The CPU features initialization code uses CPUID registers (rather than
    HWCAP).  The equality comparisons it uses are incorrect: for example
FEAT_SVE
    is not set if SVE2 is available.  Using HWCAPs for these is both simpler
and
    correct.  The initialization must also be done atomically to avoid multiple
    threads causing corruption due to non-atomic RMW accesses to the global.

    libgcc:
            PR target/115342
            * config/aarch64/cpuinfo.c (__init_cpu_features_constructor):
            Use HWCAP where possible.  Use atomic write for initialization.
            Fix FEAT_PREDRES comparison.
            (__init_cpu_features_resolver): Use atomic load for correct
            initialization.
            (__init_cpu_features): Likewise.

Reply via email to