From patchwork Sun May 7 15:26:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Pinski X-Patchwork-Id: 90851 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1629011vqo; Sun, 7 May 2023 08:27:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6H/gDgbiIDZ050+hXIm30DZpt4DdmiVCfCpNDM/KLyrDdwkPCFNc+WfLEBI9gwlyhwflbo X-Received: by 2002:a17:907:6d8e:b0:966:5c04:2c61 with SMTP id sb14-20020a1709076d8e00b009665c042c61mr971266ejc.8.1683473233218; Sun, 07 May 2023 08:27:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683473233; cv=none; d=google.com; s=arc-20160816; b=t7hIBAR6nF07JZJUCORWz67ZYqc21qswhIl53GDDwPz8Z6OJEs4SOI2EkkzSVv/F4X C5GEOXW3NJu1kpyhbbaa/eh0wcB5YfwEeukGbpavBL3R2jvF6hXtW6M3BoQ9ySs2EnRJ yzA2jPOdqaSttWztVHFW87lD7DOU6XTLUhavF55sdu7pTilCvKzIlejOMqYdODPBSJPz w58P4CHVGsId1qmpieP6swiKHY6oiTy3z4EPEDV7qAyOplhCQKGNVHnPn/T45Y0tRkV2 4TjEYp1jQIX842U1nJJzXIkwLKqHetyvpjwlIhIGBPwd6c6ibOXClFG4xVwican4e4rJ 6cpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=uh81YfAqsTT2ihU6woVx+glQ8nSO7kL5GG2jdYfI890=; b=MxP/8THDZTSGkvL6ihB6u+GWS6TC5TSy44Iwkq/zBkh1sSDZS/r8mbER0zi6lpobps JiB41QMWb2l4VtSXIEaLeUAylcDOErXZvcg5qmjhWACt0uSh51pGkbW+SO18wGx2QUj9 YU/U9w0fPePFjX2P0bCzJLyaGHPBL1Ycfc4S+gUeMqKiAB/1fH/uV1PAGl0CJaZdoUko onT9tfeSij2IxBZKhOIu2U4XAwt3USDQhJMPK/gJXVhMlE3kPFy4xIwFOY2p8n+hxHjD I2qvM7BNf2pv+UInESAzAVDe+4etz3wDKcdXcBaPB2+kOJSOo/qnUQ3+uvJ9Agl1+EtN K7yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=tKMZJdT4; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id b26-20020a170906195a00b0094f23c63a86si4338686eje.618.2023.05.07.08.27.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 May 2023 08:27:13 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=tKMZJdT4; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id ADF7B3857715 for ; Sun, 7 May 2023 15:27:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ADF7B3857715 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1683473227; bh=uh81YfAqsTT2ihU6woVx+glQ8nSO7kL5GG2jdYfI890=; h=To:CC:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=tKMZJdT4uKrt0dHXhP9NGV4g6RGPQ19F+40nkeqnFBXEGJ2u9cW9nyNt7PNSyAr5g ta3G97KCQ17xCIbsy1BtXF9Wxs8JTdq62YRnAuhf1V/A75EZkQHpiMrrpof5xa7iht AVmSfsCGkuG88xnCIZEnbbd0Ko27gro933pec2zs= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org 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 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 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) 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 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Andrew Pinski via Gcc-patches From: Andrew Pinski Reply-To: Andrew Pinski Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765249629008348524?= X-GMAIL-MSGID: =?utf-8?q?1765249629008348524?= 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; };