Message ID | 20230201094650.65755-1-christophe.lyon@arm.com |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp180087wrn; Wed, 1 Feb 2023 01:48:29 -0800 (PST) X-Google-Smtp-Source: AK7set89Qu1hlT6XKxjssgRSdnvDnfSxGEURYG87X3zWJ9JGVgtfm1A+yL2TO5zUkNqoo37pwr91 X-Received: by 2002:a05:6402:35c7:b0:499:cc32:6a52 with SMTP id z7-20020a05640235c700b00499cc326a52mr7443668edc.16.1675244909804; Wed, 01 Feb 2023 01:48:29 -0800 (PST) Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id t21-20020a056402525500b004a21d3b00a9si4319299edd.69.2023.02.01.01.48.29 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Feb 2023 01:48:29 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=VUof1lnH; arc=fail (signature failed); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c 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 D0F0F3858401 for <ouuuleilei@gmail.com>; Wed, 1 Feb 2023 09:48:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D0F0F3858401 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675244906; bh=FS4RXSz0jTS5kUgArV3g1s8GPooul+ozN0eiN9iYYxo=; h=To:CC:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=VUof1lnHba/T1zZ/WEs+uu2Ef6q7uZ8ql14c2N1lcWikTadn4T+FWQKa5GUTbMEg4 P8W4uDq8cTKY3DUDoMuSLRR/AzZtcITso+Nw+pQhMAXToANSB3y3RGxvXlcyVrM9RU X9PBQnbfXxa9LGbswMJ7GHYhWpNFqfp21rwWjtzQ= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2040.outbound.protection.outlook.com [40.107.104.40]) by sourceware.org (Postfix) with ESMTPS id 8D6D73858D39 for <gcc-patches@gcc.gnu.org>; Wed, 1 Feb 2023 09:47:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8D6D73858D39 Received: from AS9PR05CA0172.eurprd05.prod.outlook.com (2603:10a6:20b:496::33) by GV2PR08MB8677.eurprd08.prod.outlook.com (2603:10a6:150:b9::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.38; Wed, 1 Feb 2023 09:47:30 +0000 Received: from AM7EUR03FT046.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:496:cafe::53) by AS9PR05CA0172.outlook.office365.com (2603:10a6:20b:496::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.38 via Frontend Transport; Wed, 1 Feb 2023 09:47:30 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM7EUR03FT046.mail.protection.outlook.com (100.127.140.78) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.33 via Frontend Transport; Wed, 1 Feb 2023 09:47:30 +0000 Received: ("Tessian outbound b1d3ffe56e73:v132"); Wed, 01 Feb 2023 09:47:30 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 7cc61b23ee3e744f X-CR-MTA-TID: 64aa7808 Received: from e689a3be2d5c.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 5943E5B9-18D8-4BF3-A42A-00B5AF1BF97C.1; Wed, 01 Feb 2023 09:47:19 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id e689a3be2d5c.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 01 Feb 2023 09:47:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SodFfD+aF1Vt/NmJKsYYuL/LbPCitYTtPy9AXZsYLU5hSMqufEgA0yyn9/XUwsRgLNwZds2Igrab1mmO1H0lhhUPRxYZIdO0ds2pkeNHRTMD8y9oBa/HT4BHB3hrrct94EnTiacvFaBM9vFLzGLc5yTVlOxwz+dSgQECUi+3iSFEX0tmoR2ygduHMupskR3AlfvGBeYU/MDzAxy7rTqp9LeL8fFoRBQOtddJ8ANrzHFrw7uJ6RRpLsDlOW2LzGZSR0GVaqE5YTGcKb1Mc9lhDbrm4QKJU2cfKsuuApMZkwFdo1uzBW2+MuLE50zpc4m5QAbmVxDkWQdpv7P2gDwU3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=FS4RXSz0jTS5kUgArV3g1s8GPooul+ozN0eiN9iYYxo=; b=WCd9ux12TNMJDr0HTcQ0pfq8h+8zJIBzPzaRgceiSM/5YhH1322vEc4hZ9m+NdmA8Qy5VjGbBcsqQnMOLzRBOFBGiV50LmBA0uvxMwLYufktAlvHnBby9sYqIEd+ASKvds87tR66D9/2Pne8uTtrCqblloOApu0Cws3OP2ok/HnSo51BadswpZtVf4P5hNPoN7eoDQnhjblFMUtIKR3CLBOikbZ/n1MZ/cjNjM7mwvJ7mWke2qRriOOIBMn7znFi4cbQMmjtg6hikAyGq4i0Ny5kIoF0SwILtx0OgKwH7FvwBghQQkgJSdw2nndw4CnSi6AptnSqbjVkp83FGQmGuQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none Received: from AS9PR06CA0638.eurprd06.prod.outlook.com (2603:10a6:20b:46f::32) by PAVPR08MB9747.eurprd08.prod.outlook.com (2603:10a6:102:31e::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6043.38; Wed, 1 Feb 2023 09:47:05 +0000 Received: from AM7EUR03FT054.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:46f:cafe::2) by AS9PR06CA0638.outlook.office365.com (2603:10a6:20b:46f::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.24 via Frontend Transport; Wed, 1 Feb 2023 09:47:05 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by AM7EUR03FT054.mail.protection.outlook.com (100.127.140.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6043.22 via Frontend Transport; Wed, 1 Feb 2023 09:47:04 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Wed, 1 Feb 2023 09:47:04 +0000 Received: from e129018.arm.com (10.57.49.82) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.16 via Frontend Transport; Wed, 1 Feb 2023 09:47:04 +0000 To: <gcc-patches@gcc.gnu.org> CC: Christophe Lyon <christophe.lyon@arm.com> Subject: [PATCH] arm: Fix warning in libgcc/config/arm/pr-support.c Date: Wed, 1 Feb 2023 10:46:49 +0100 Message-ID: <20230201094650.65755-1-christophe.lyon@arm.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AM7EUR03FT054:EE_|PAVPR08MB9747:EE_|AM7EUR03FT046:EE_|GV2PR08MB8677:EE_ X-MS-Office365-Filtering-Correlation-Id: 293ec1c2-a12c-4128-6ae7-08db043955fa x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: VmGcbBk9cu+F842aLKWngAD/fZBdPsmPRLI34AadyUeSjhkKjWRwO9ZNSxA/vrX6cFITQOEXeujGGalF+PLWaWNEEHCqBnperJ4vSRz1d2R9pabMSobE8Lr+lOcdQHMlfL7NjoEpvghh4ywxryCed7/2McC2NfBEx2nn5spNFSQLC960dE11vhpkXkBWnYQSye0a8uipX8XtcTsdpq/Ae/iT3LVD64ca3k2XqeM3+mXM1gz8BsDiJpVReE6SXg6MsAjrwod4mii0595atn0d2yrfjXBVlI8tw8f4R3XJrZjfCeAhIeleUePP5XBxx4Dih4Y+FJdVWUBXwA/ySF33vMTH35ryb2sGd3kbGaGmTqArS/RuIyfRQ2qjH2YUeet6RWsr7X3Y46doZrxPCVbnF3Zx38qotg47FV2eARXNJUbizYOYJGwRmte0T8RFgB6FlOxWFr/oj1nAjV6muBhQP+g2AC2nfXI+xUQJa8pssVEaJ2sUOMgBJUfxlBZDCkjeIgxS8EIIdCxOcPlOQOGZFw1bZq/Iw6VMYb1w9/umyMQvlb9CkOUIBwiif2HpkVoOdJHg6GRJDeYZjuOLkYkaVlbMO+uDGlN1GMb+5JW6ajjg1w2i+5EBUH5XKcwqTYpTzqI4CyIuVl1kmVahHx7AlibL+x74gcJ53Ou/hD7t7kgK9OnY9DMp+IU7LmGagFSGBtsWuAYr40UjtRfgk2tMpVHfKgPrlmCCNs7DfTzkTIA= X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230025)(4636009)(396003)(376002)(346002)(136003)(39860400002)(451199018)(46966006)(36840700001)(40470700004)(7696005)(6666004)(478600001)(41300700001)(2616005)(336012)(186003)(26005)(1076003)(70586007)(316002)(70206006)(40460700003)(83380400001)(8676002)(4326008)(6916009)(82740400003)(81166007)(2906002)(8936002)(36860700001)(5660300002)(36756003)(426003)(82310400005)(47076005)(356005)(40480700001)(44832011)(86362001)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAVPR08MB9747 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT046.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: b5acea35-1030-4947-4681-08db043946ca X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qi3PzLkgIOPUa1CI9T7+Ijl/5QLRWIiH2E0HJouC+dUnXMBkz1A9wJrQuVvBm9TrXRfnsDZaTAAT1hYj8mayljwyr8lHToTQ+V90N6bffhRw+Ib0Y+Uw0Vkagscebxl1OqHJNypMYeR/X0kxHYoAepNrZp6z+OY3jlH78rhrLGvSzYK9qNsM2xZEkDa9b8EkbovpM2chN1cZVeLFSJ+3n2SGMyDOzs6MNM+LYwJqG9S8dVYvLFIdxMwk+bANIELQybqO6B1QvftXRzPGEzzdX3vqSDWwtohM3w16nU7nAhmprHQa7LVyaA4msP/1AyGnLJlbl30vTV3sld39F4CIRMeP2ZIk6eitQi6Z8wNT+Hmsg571cA5/UULuozOlNR6lNVmbzWsi8dY9T+BgSQ+Hl6NppuedyAPxsohnDiy1lTWiookZf5r7iJYKPt0DzNBZaUtJ9HSPy1mp9uzljWHRKcm9Ca5hnkeJDnJmVG3fnoRTJT4GdepKMD7hyaFTxtw05JUxO/SLAy+rJKhZcgYOSPV8vUAdeIcy7v6nCK71FNjpXHy35/xN2jHZbJIPoY8Nbxtoa+6sKmaDj6vaKj/ffoFr37Ng4JKeh/4ilpn32/psMJxKGomS/YSOzbAJWAL/l1+Og8E3156Fhd0B25NwxW12zl3omZcMu6iUUb5cGwa6bXERN9Z7o9wD5B1bmbV7HnppCwY8Wb5DcLGSY2ZHaQ== X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230025)(4636009)(39860400002)(396003)(136003)(346002)(376002)(451199018)(36840700001)(40470700004)(46966006)(40460700003)(70586007)(83380400001)(6916009)(41300700001)(316002)(8936002)(4326008)(8676002)(70206006)(1076003)(6666004)(26005)(336012)(478600001)(426003)(7696005)(2616005)(81166007)(86362001)(47076005)(186003)(82310400005)(5660300002)(36860700001)(36756003)(44832011)(2906002)(82740400003)(40480700001); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Feb 2023 09:47:30.4710 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 293ec1c2-a12c-4128-6ae7-08db043955fa X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM7EUR03FT046.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV2PR08MB8677 X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, KAM_DMARC_NONE, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP, UNPARSEABLE_RELAY 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 <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Christophe Lyon via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Christophe Lyon <christophe.lyon@arm.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756621606356217697?= X-GMAIL-MSGID: =?utf-8?q?1756621606356217697?= |
Series |
arm: Fix warning in libgcc/config/arm/pr-support.c
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Christophe Lyon
Feb. 1, 2023, 9:46 a.m. UTC
I have noticed some warnings when building GCC for arm-eabi: pr-support.c:110:7: warning: variable ‘set_pac_sp’ set but not used [-Wunused-but-set-variable] pr-support.c:109:7: warning: variable ‘set_pac’ set but not used [-Wunused-but-set-variable] This small patch avoids them by defining these two variables undef TARGET_HAVE_PACBTI, like the code which actually uses them. libgcc/ * config/arm/pr-support.c (__gnu_unwind_execute): Use TARGET_HAVE_PACBTI to define set_pac and set_pac_sp. --- libgcc/config/arm/pr-support.c | 6 ++++++ 1 file changed, 6 insertions(+)
Comments
On 01/02/2023 09:46, Christophe Lyon via Gcc-patches wrote: > I have noticed some warnings when building GCC for arm-eabi: > pr-support.c:110:7: warning: variable ‘set_pac_sp’ set but not used [-Wunused-but-set-variable] > pr-support.c:109:7: warning: variable ‘set_pac’ set but not used [-Wunused-but-set-variable] > > This small patch avoids them by defining these two variables undef > TARGET_HAVE_PACBTI, like the code which actually uses them. > > libgcc/ > * config/arm/pr-support.c (__gnu_unwind_execute): Use > TARGET_HAVE_PACBTI to define set_pac and set_pac_sp. OK R.
diff --git a/libgcc/config/arm/pr-support.c b/libgcc/config/arm/pr-support.c index 9c9d4eed85f..6c36ab47756 100644 --- a/libgcc/config/arm/pr-support.c +++ b/libgcc/config/arm/pr-support.c @@ -106,8 +106,10 @@ __gnu_unwind_execute (_Unwind_Context * context, __gnu_unwind_state * uws) { _uw op; int set_pc; +#if defined(TARGET_HAVE_PACBTI) int set_pac = 0; int set_pac_sp = 0; +#endif _uw reg; _uw sp; @@ -258,7 +260,9 @@ __gnu_unwind_execute (_Unwind_Context * context, __gnu_unwind_state * uws) if (_Unwind_VRS_Pop (context, _UVRSC_PAC, 0, _UVRSD_UINT32) != _UVRSR_OK) return _URC_FAILURE; +#if defined(TARGET_HAVE_PACBTI) set_pac = 1; +#endif continue; } @@ -266,7 +270,9 @@ __gnu_unwind_execute (_Unwind_Context * context, __gnu_unwind_state * uws) if (op == 0xb5) { _Unwind_VRS_Get (context, _UVRSC_CORE, R_SP, _UVRSD_UINT32, &sp); +#if defined(TARGET_HAVE_PACBTI) set_pac_sp = 1; +#endif continue; }