From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 950A83935DF9; Wed, 5 Jun 2024 13:21:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 950A83935DF9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1717593696; bh=yXeU1uYblPEY2hV9UTlUbdw175VV9xwyf3i8vGZJ+ts=; h=From:To:Subject:Date:In-Reply-To:References:From; b=L+bVwLqyeUzlRzbIaADirDGfvQ+oqR++6DtvuzAfnOrrWJlE3jsn3spa2DzPqMtVw 0WVWwKLJ0l5nIr27RT8+nzgTfhltls42iDmrbaugwCZySzSLsOYZUZm/hs0nPdTHMj oou0dr6mxHnZCgWjW26CRvbIchztx4s8jKRDViGM= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/115342] [14/15 Regression] AArch64: Function multiversioning initialization incorrect Date: Wed, 05 Jun 2024 13:21:36 +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: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: wilco at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.2 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=3D115342 --- Comment #1 from GCC Commits --- The master branch has been updated by Wilco Dijkstra : https://gcc.gnu.org/g:d7cbcfe7c33645eaf95f175f19884d443817857b commit r15-1036-gd7cbcfe7c33645eaf95f175f19884d443817857b Author: Wilco Dijkstra 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 mult= iple 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.=