From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by sourceware.org (Postfix) with ESMTPS id 31C9F3858D28 for ; Sun, 7 May 2023 15:26:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 31C9F3858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=marvell.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=marvell.com Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 347CMSVb020812 for ; Sun, 7 May 2023 08:26:22 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=uh81YfAqsTT2ihU6woVx+glQ8nSO7kL5GG2jdYfI890=; b=B+TM/dSwxTpyaL5pNeGgde7At91C9kl/gUXaq5WTyvLuWCZwxQkVlwdDy3GLeigTVv2B sGTv72XWvwQvF+oeHGZYvZ8zM08KLoSSeJCF0NaCxiYvYOITFGOVdp1/itflEdNwO+j1 ZFsRu0fgxQK4JOO33tq/XBKwz4ytl4q0HakbjqxgNb5RVRV2RGsLe0VN9LMAHAD1n8rT 2Enq1ii3Ha4kPGUQokta86ysAk1KRda57UXejCJthIidtv0jODTte5Gmv5oYguJQh9Ya 72t3K8gj2DLdMKdqis1pR4hcv8w8klu5bXL1+4EnLGmu/b7VlQIIb9rTWka/TMLpoRru 1A== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3qdm8t37qa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Sun, 07 May 2023 08:26:21 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Sun, 7 May 2023 08:26:20 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Sun, 7 May 2023 08:26:20 -0700 Received: from vpnclient.wrightpinski.org.com (unknown [10.69.242.187]) by maili.marvell.com (Postfix) with ESMTP id AF2303F70C1; Sun, 7 May 2023 08:26:17 -0700 (PDT) From: Andrew Pinski To: CC: Andrew Pinski Subject: [PATCH] Fix aarch64/109762: push_options/push_options does not work sometimes Date: Sun, 7 May 2023 08:26:00 -0700 Message-ID: <20230507152600.1150387-1-apinski@marvell.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: ZgCjVwt7Owp1l6GoyMOVN-8ywiF2zxgU X-Proofpoint-ORIG-GUID: ZgCjVwt7Owp1l6GoyMOVN-8ywiF2zxgU X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-05-07_06,2023-05-05_01,2023-02-09_01 X-Spam-Status: No, score=-14.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: aarch64_isa_flags (and aarch64_asm_isa_flags) are both aarch64_feature_flags (uint64_t) but since r12-8000-g14814e20161d, they are saved/restored as unsigned long. This does not make a difference for LP64 targets but on ILP32 and LLP64IL32 targets, it means it does not get restored correctly. This patch changes over to use aarch64_feature_flags instead of unsigned long. Committed as obvious after a bootstrap/test. gcc/ChangeLog: PR target/109762 * config/aarch64/aarch64-builtins.cc (aarch64_simd_switcher::aarch64_simd_switcher): Change argument type to aarch64_feature_flags. * config/aarch64/aarch64-protos.h (aarch64_simd_switcher): Change constructor argument type to aarch64_feature_flags. Change m_old_asm_isa_flags to be aarch64_feature_flags. --- gcc/config/aarch64/aarch64-builtins.cc | 2 +- gcc/config/aarch64/aarch64-protos.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/config/aarch64/aarch64-builtins.cc b/gcc/config/aarch64/aarch64-builtins.cc index 94ad364b997..cb6aae3f1fa 100644 --- a/gcc/config/aarch64/aarch64-builtins.cc +++ b/gcc/config/aarch64/aarch64-builtins.cc @@ -1547,7 +1547,7 @@ aarch64_scalar_builtin_type_p (aarch64_simd_type t) /* Enable AARCH64_FL_* flags EXTRA_FLAGS on top of the base Advanced SIMD set. */ -aarch64_simd_switcher::aarch64_simd_switcher (unsigned int extra_flags) +aarch64_simd_switcher::aarch64_simd_switcher (aarch64_feature_flags extra_flags) : m_old_asm_isa_flags (aarch64_asm_isa_flags), m_old_general_regs_only (TARGET_GENERAL_REGS_ONLY) { diff --git a/gcc/config/aarch64/aarch64-protos.h b/gcc/config/aarch64/aarch64-protos.h index 4904d193647..b138494384b 100644 --- a/gcc/config/aarch64/aarch64-protos.h +++ b/gcc/config/aarch64/aarch64-protos.h @@ -733,11 +733,11 @@ const unsigned int AARCH64_BUILTIN_CLASS = (1 << AARCH64_BUILTIN_SHIFT) - 1; class aarch64_simd_switcher { public: - aarch64_simd_switcher (unsigned int extra_flags = 0); + aarch64_simd_switcher (aarch64_feature_flags extra_flags = 0); ~aarch64_simd_switcher (); private: - unsigned long m_old_asm_isa_flags; + aarch64_feature_flags m_old_asm_isa_flags; bool m_old_general_regs_only; }; -- 2.31.1