From patchwork Wed Sep 18 14:05:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Longo X-Patchwork-Id: 1986830 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=WFqlGfXj; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=WFqlGfXj; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X80nT6NbKz1y2j for ; Thu, 19 Sep 2024 00:06:37 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 145093858428 for ; Wed, 18 Sep 2024 14:06:36 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR03-VI1-obe.outbound.protection.outlook.com (mail-vi1eur03on2062a.outbound.protection.outlook.com [IPv6:2a01:111:f403:260c::62a]) by sourceware.org (Postfix) with ESMTPS id A1E38385828E for ; Wed, 18 Sep 2024 14:06:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A1E38385828E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A1E38385828E Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:260c::62a ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1726668373; cv=pass; b=iL4eNrllknuhxo2WmkfMEc5o7V8OX75DRUBTVM978KsEZXlOc1ZxMcJPSzaazJFg6PQr3yCFdmDBIl6GgWprqHC5Mxpl8SlEzq2X/VEMOEC9zj25E39iXwBA5TJS+GcR5JzAZa4SC+8cCvVYv7cUC8rR2N5pWqp738GZ5qW3/7g= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1726668373; c=relaxed/simple; bh=SX2QXO0+SAVu0udeB3KTWogcVdA6wYwDPHrE3zeAtfQ=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=gIDitpaSMHeN5aUdJK2WaislpzRfy3ArCO3ySo5r0nqs4ddLXAV//VCjhsjeWTCnXtNwHkAxNGOQveqvHWnqcN6gXOqGfpY3ksfxwmDl8ewiBPJlWoA3e+1VetjVbrNXZI3fXWKBECUERzpUiIzEUfBlrvjg8luDopwp6rxYZ0U= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=F7wLNXiZX4I4ZEibnDB09lrMHygzhrL7oYJZNLnfIdAuKtetSTWeF0S9MwwtxZe0j/CMljk5W+yszRilMSj2xMGcHH3UMjRqA2ZohaDbX4OJrf7OdXoKqRLIr1IF14lW/eJMv4GscRuCfXHR7qf9wTaXKOcUoIo1yGgLzhryFX2vin8OJeKZ87vTt9Nsxmr2RysMDCbXUcR0OycFpeUhZnt2jm4+N0O5KWDvbc475ntD8bUiYNEAiqXxxyZaCr+SfHg4SxgYNcsV+QOOpN7NOwjhkSSDkTo8rensTvgQIZmC4bMNfENK+mKD32pStF0Gh0s/qDul6BHhZRy4kvUaRg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=riDLLP/Au7GeML2zDfyI9lBUJ+49ruxXPsK5CWlUVvM=; b=HHIZdz62f6Otg3lTMyTc2T81H7u8c+taKi2/b8KFDnl/vjAdz82uSL6jFxxZXXs+/Jy33ECm1E95vVT2lz70ZSuGgJjVxsnerNWvkQXvYC6RIpp3c27ZTQZHJZpnGdL8V74Kv68ZbhFtOYkxwomon5FJnm4KOrL9qho0WKrPK66ExxDqk7X13ilq5USQydnBpxldrjcTkh/ftBKCxPAhRUVybchatWRf+tvoyGSEqgsR62aMZPxBPnQDjL0Sn5M+eaXRGB904CW6npJMvlgFUDkquekfYmjQRVdzMJSHOJP/itLMuoBXNIazYFF4g1YKLnqscMvCHWHbG8tlgLxpmQ== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=riDLLP/Au7GeML2zDfyI9lBUJ+49ruxXPsK5CWlUVvM=; b=WFqlGfXjT+bc2GyEHZaPlKNdULlD4Edo9SEFCTLbPhOoPDXzff7qeOEk1kQCddVZonAS7EXaSr5Mo5FG1WekAg4ca1M00t+2TyoEyiD3NXxWwzU8KGdvwRCnkkTuyOoODiQ4tLPVcHtefl2LWQx4k8oQYuTRc8KLVm1RBk89uQE= Received: from PA7P264CA0518.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:3db::15) by PA4PR08MB6144.eurprd08.prod.outlook.com (2603:10a6:102:e3::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.15; Wed, 18 Sep 2024 14:06:05 +0000 Received: from AM4PEPF00025F99.EURPRD83.prod.outlook.com (2603:10a6:102:3db:cafe::f) by PA7P264CA0518.outlook.office365.com (2603:10a6:102:3db::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.30 via Frontend Transport; Wed, 18 Sep 2024 14:06:05 +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=arm.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 AM4PEPF00025F99.mail.protection.outlook.com (10.167.16.8) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8005.1 via Frontend Transport; Wed, 18 Sep 2024 14:06:05 +0000 Received: ("Tessian outbound 467a4accc038:v457"); Wed, 18 Sep 2024 14:06:05 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 2779b6513071ae0e X-TessianGatewayMetadata: fjDckVLmGmV1589hyKKxWLaPKTb9mN8MYigfx2Yle5Je8KKMERo4q1O5OrUnh8WhUfk3pAWCsapybdYh/RrvQwEDBku66++F6F9DT8m3Bi5BAEW0r6ERW9K2AimtrtnqbhXegpVlHZxyvHsP2n/l3XJFvI4VQc9eYNkRdjfjtSc= X-CR-MTA-TID: 64aa7808 Received: from Lb44faefae269.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 5D7A3873-31BE-48CA-BA59-F10F14DDBE56.1; Wed, 18 Sep 2024 14:05:53 +0000 Received: from EUR02-AM0-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id Lb44faefae269.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 18 Sep 2024 14:05:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Z2Y6b9jtIjkjt/XsQXXgznmjsuKIg3n1bY/EPiXnKCO1dGYLXZFS1G/wqlku2VozP0dHrLdE44JQIR6uZljT7jVChFBMMNDeafHU4kGdfn5bf5HqxSdOwWVctgYpSSq6xSSrmTuPO6Tlet8c/Dco1ZESnTFKGbF7R6Z2fuXCjuMZh4rGZUhPHzDum7kTk6aVKqvB42hBxMl3eBg2pjLOuwktCCEzNVZ2GxaK9jeW5t4YbuOMmNvgo69kA0HbOjI1s1s1XDSKTJdQ3FTAFFkTulAKUBBFLg20kWWZ4+4Poaf1XS8chTuUI9Cmj/u90/TOCuHhkbfK5EggXaVeu60RUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=riDLLP/Au7GeML2zDfyI9lBUJ+49ruxXPsK5CWlUVvM=; b=HNMsPsXayc2oxt/bp/azzyGW6GGUV5G/vEZnMic0N8g27WINyJY+5ZaPy6bGy0XOh+z5fXxRvYTvV7gqiEt9pWEc/WSFTXaW1O3hUY1lMVSACRhlNIqMl8EmhnjUy9kNGtkpyQ6KlkTk2Ehnpo7gw6nF8+SVMLd1qgFp+7PARVP9huK+MQkCrwi97bJwhP1MMbPAcwpcJKrxnm/9ai1yEWl9Bcg3DfQ+STH72aTasiNu73cJ9V2gU3MySEPAc87jUpd2bWo1898mNeAHOtDWOf8Wbe9GRHbTLSU89zuoYWXZR3q/9SB1myLyplgqT0v6KlKxi9Ouni9N5NIYo7bBIA== 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 (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=riDLLP/Au7GeML2zDfyI9lBUJ+49ruxXPsK5CWlUVvM=; b=WFqlGfXjT+bc2GyEHZaPlKNdULlD4Edo9SEFCTLbPhOoPDXzff7qeOEk1kQCddVZonAS7EXaSr5Mo5FG1WekAg4ca1M00t+2TyoEyiD3NXxWwzU8KGdvwRCnkkTuyOoODiQ4tLPVcHtefl2LWQx4k8oQYuTRc8KLVm1RBk89uQE= Received: from AS4P250CA0014.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:5df::17) by VI0PR08MB10779.eurprd08.prod.outlook.com (2603:10a6:800:203::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.14; Wed, 18 Sep 2024 14:05:49 +0000 Received: from AMS0EPF000001B4.eurprd05.prod.outlook.com (2603:10a6:20b:5df:cafe::26) by AS4P250CA0014.outlook.office365.com (2603:10a6:20b:5df::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.25 via Frontend Transport; Wed, 18 Sep 2024 14:05:49 +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 AMS0EPF000001B4.mail.protection.outlook.com (10.167.16.168) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7918.13 via Frontend Transport; Wed, 18 Sep 2024 14:05:49 +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.39; Wed, 18 Sep 2024 14:05:48 +0000 Received: from PW070M4K.cambridge.arm.com (10.57.76.20) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Wed, 18 Sep 2024 14:05:48 +0000 From: Matthieu Longo To: CC: Richard Earnshaw , Richard Sandiford , "David S . Miller" , "Eric Botcazou" , Jason Merrill , "Cary Coutant" , Jakub Jelinek , "Matthieu Longo" Subject: [PATCH v2 1/4] Rename REG_CFA_TOGGLE_RA_MANGLE to REG_CFA_NEGATE_RA_STATE Date: Wed, 18 Sep 2024 15:05:32 +0100 Message-ID: <20240918140535.1538392-2-matthieu.longo@arm.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240918140535.1538392-1-matthieu.longo@arm.com> References: <20240918140535.1538392-1-matthieu.longo@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AMS0EPF000001B4:EE_|VI0PR08MB10779:EE_|AM4PEPF00025F99:EE_|PA4PR08MB6144:EE_ X-MS-Office365-Filtering-Correlation-Id: d9a7cd1c-052b-468e-cdfa-08dcd7eb0978 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|36860700013|1800799024|82310400026|376014|41080700001; X-Microsoft-Antispam-Message-Info-Original: r8U33cSwzN589JT6oY208JLVGGN7oPtkO9bSyiivIWbw1i6YcXgh68Tyvf/dgFaSkEgGkKG3hiMIg5gl+P/fiRq4fR739LKUrgcgrBm/0He6ToCToaa2EkO9krAS4S9w4bNhAYu/DwzMY8IbMjOws4gG46uqiDbcqvHtsh9zR5Z03QvZqjlMHG4Cv3w3GXYFQ9qsaO9d6KqQ91ZvYDZ3Ljpb65iO72FASuo8Q6wFnjoYZh11aRlM9ndWqJeTPI8QXNOJvVhIoiFjAsss3IBmZ8w2wjQt9ZP51Kp+7khZ3c5okDPugm83lMg/z/cmg32ojT4z93J4SdrMxHCBboapHrqUqIRtXj8Zbpc6DRR35m8o+LvUjvly4cqOhMIBDkXklf3oqsnbksEa8ewwAaLNo0qdV52NKrSXDj/WH8IUYlY1H9KLdvmiokf6dWt+TwyfdMDiVZVV3Ko/rlI8eQ2gxjBLcNFrLitGNpfu5Jej6jt7oEmnA07mSkoO+ov+KOt5kguI70bzvcKrCbGHLzB+Z2Lm+LJJCQea+1cQisquzTMONkv8LhOwUag8pDD/qlSt14ux7wJJLJXsyy1GA6bAQiQJs96I0cfMqHEJetKT1VNcLF1R/cFJGx1/PB0xdgaG37BNvo1lR8awxdpVChLaihl9PSB165WJqPDN3pijI6mZKXgy4kMnK+5glnPTGlcX+VpmVaHZG65HLx0WuAHYwEi86Y1ckU7lAldv6Q6BTJjiTtdQ7679VQ3QoNL3OuzAFkBYZmswnw6mMM8y5GmnN2IBTsyOfzm/5HomUUg7TwzBv8RleA7u46azy1TTv1u4cgMX8JrjUjRbPach42rdvDbdV6+9YANY5EQWiJK/CNZW85cWgqcGRNn9+MVxqD7ipeNNGist8t/6UCaxASL/cqJ148XmSHV5GPZOy9eaW9S+eH1d/+MIXWPAgkAyUONn+jUiWYbyeun4cFe9PXfKyT3IV7YsaVNkzy/1fnmfneaM+tWMDJxIsRc6cRR+z7ZlOEhO2sS0DUtPScHM7Ts6/N81TjfLTW4xJdAK9hnH1NIDKvZLO6jjvism5/o8QPwag4Ml1yjfF5rabuWF7y6a5fGtVVeX0dgcUbP/z6xuLMm3LISj/4k3AfgYTaqVfKYmoc5/ZTCqsEhYXFsvcCvEQ/aDCOhLfTZJ8sX/pg2jUXN37qrBsUh5H7eh52ZbiaqM/TCWVxX40iHWD1K7BWSeDUdsBCpA7CJSN0QI6GQq/99U7peqEvv8znYLyLYxgULiFBg5/Rxypl49Jm501mph4cEgk20zQsUXj50Z0oIIFhsxIodNP/KO8CG73YV65aUJ1dy0WRnPl/oWNJZamVL7wGZO+Eb3LWBO7Tm6sbVrgeLTceqqQXOFofhoUA0IKGMmidzMQeanOzpdDU4cIQ2DsuMYYmDlDCTtbUA5a7u0OmjHFMW1ajr3eR4xgBTKczWdM8jHEyqtY9Qtvf/bEB51Pg== 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:(13230040)(36860700013)(1800799024)(82310400026)(376014)(41080700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR08MB10779 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:20b:5df::17]; domain=AS4P250CA0014.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM4PEPF00025F99.EURPRD83.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: a3a12e8f-51fd-4707-fbed-08dcd7eafff3 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|36860700013|376014|35042699022|1800799024; X-Microsoft-Antispam-Message-Info: Qhvww9xZsFdDC/zv7IT+kbjiHuzx2V+CJqtpIu6Hh9/XlpsAYsQBoPgcgohdJHm0tAe26f7U4U0vEFERBKQBAJRZA1Om2+KFbVZ3QzqkvbIJ884bK3Kk/mT7ANTi3vshA9uLaxuCLrAW3/XM/VKitJveUtSPOWbFZfJrs2cBraSJ6bXP38rch7T5m6HPYZtyq64PSvT6CnE7d5YPcU9BqWzhByCG9zhIL4NtDyUc+JGK3xFhT9upG9YZKglu33aZ6CPxsRO8pjO4mRcCDjfyTEaaqx+7edfW69VLbDlolEeG7Owhg2IVg5ajeb5Xai57+fxmMFZBbjyLauFDvh8Jz2kOLbxCxMJ+DXmrQBTaDuYEJAlp8UpmrajdxPBRS0r52ytEMCSaVvxR93DrBRA0zAw+kSF0MAZ7PCf9dCUVtP0f1jlshjHSszPBiYQSlRIC5UeN+YYI0aUlnnljTlUjM79dH1npBnlCuf6Es7ua2k2hktyl5JBrLKr+65Cvwc94wnkVp/BEiqoDN9fqHbFW3AAdOvLU+xp3CFamDFuEOipgvfXrjA6ohiPl9aESiTlxjQf5uqY2BEzRqqewyRFiDNX+6AhloSkaUdiggiUtroL816X2CJr7B8lnWPuH5D3G6ra59qBdn0vpCYmvGjBEmTPLe2wH4xe1QhGvrPOruMCU4aYMcNxgHs4W3y2wLcF1cAqotPYUruY20z4ml67zsoc4i7MPHzflM8d2Q4nwAzIV/wrcxhp5+V7JDbcUyw8Qo7fILxYxMGNXcA935A3rT8WWxpa9MsK1ELBkkKh0qsdNb2w2rphWCYe8fMRmoEr7Q34XKdh6TQ5GMTXGPzXm7Nahev2lUT+X9bcXowjpe2x4vaZctBJhW5zEtZfJfoPGo05HQMAayDTU/0Mmxs9rZUn8WSlEcmvHAHzlnpcXvUg21F7kkyWiEUeVZZKAUPVvj/cg1G4+L7lONQ1DZn18FH/LAKET/vECj4JlGFGDaN4YNbzl/scyjop1U5C4c4ldTHGBqr40QmgEMtQGgWdGm6j+Jz09Y28dFT7Kj2dLbScLWMu8/7RptT2GeWerDmbpSdYxZlAyNWS42BUisGMJ4ZKskS7tMjXos/IayFhb0/FHzwIQv8x7RhqujcbayWVJXBHpmj6N7+zZM9W/wVlOMVe3qN/Ahaice0m7AWoOLOrL/5k0Nu+xv06SReDCBMs9HmDp9ElMjlshx9J1p3Lw8po4ICtrK7of3VVkOFcG1KI9TGAvId8OCY6uy5kO0nwPYgYZREzujaHgBPHRoiZQQ5jm+STc0ORw7vlmsB1k1XmpLEnLVT7Qgb3/S080fDWd03X0Aa1aPWOrxFjA7VDZHnDskPLzADPKqoSx7Lhyzqw= 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:(13230040)(82310400026)(36860700013)(376014)(35042699022)(1800799024); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2024 14:06:05.3934 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d9a7cd1c-052b-468e-cdfa-08dcd7eb0978 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: AM4PEPF00025F99.EURPRD83.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB6144 X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, SPF_HELO_PASS, 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org The current name REG_CFA_TOGGLE_RA_MANGLE is not representative of what it really is, i.e. a register to represent several states, not only a binary one. Same for dwarf2out_frame_debug_cfa_toggle_ra_mangle. gcc/ChangeLog: * combine-stack-adj.cc (no_unhandled_cfa): Rename. * config/aarch64/aarch64.cc (aarch64_expand_prologue): Rename. (aarch64_expand_epilogue): Rename. * dwarf2cfi.cc (dwarf2out_frame_debug_cfa_toggle_ra_mangle): Rename this... (dwarf2out_frame_debug_cfa_negate_ra_state): To this. (dwarf2out_frame_debug): Rename. * reg-notes.def (REG_CFA_NOTE): Rename REG_CFA_TOGGLE_RA_MANGLE. --- gcc/combine-stack-adj.cc | 2 +- gcc/config/aarch64/aarch64.cc | 4 ++-- gcc/dwarf2cfi.cc | 8 ++++---- gcc/reg-notes.def | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/gcc/combine-stack-adj.cc b/gcc/combine-stack-adj.cc index 2da9bf2bc1e..367d3b66b74 100644 --- a/gcc/combine-stack-adj.cc +++ b/gcc/combine-stack-adj.cc @@ -212,7 +212,7 @@ no_unhandled_cfa (rtx_insn *insn) case REG_CFA_SET_VDRAP: case REG_CFA_WINDOW_SAVE: case REG_CFA_FLUSH_QUEUE: - case REG_CFA_TOGGLE_RA_MANGLE: + case REG_CFA_NEGATE_RA_STATE: return false; } diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc index 92763d403c7..acb2ddb9170 100644 --- a/gcc/config/aarch64/aarch64.cc +++ b/gcc/config/aarch64/aarch64.cc @@ -9612,7 +9612,7 @@ aarch64_expand_prologue (void) default: gcc_unreachable (); } - add_reg_note (insn, REG_CFA_TOGGLE_RA_MANGLE, const0_rtx); + add_reg_note (insn, REG_CFA_NEGATE_RA_STATE, const0_rtx); RTX_FRAME_RELATED_P (insn) = 1; } @@ -10033,7 +10033,7 @@ aarch64_expand_epilogue (rtx_call_insn *sibcall) default: gcc_unreachable (); } - add_reg_note (insn, REG_CFA_TOGGLE_RA_MANGLE, const0_rtx); + add_reg_note (insn, REG_CFA_NEGATE_RA_STATE, const0_rtx); RTX_FRAME_RELATED_P (insn) = 1; } diff --git a/gcc/dwarf2cfi.cc b/gcc/dwarf2cfi.cc index 1231b5bb5f0..4ad9acbd6fd 100644 --- a/gcc/dwarf2cfi.cc +++ b/gcc/dwarf2cfi.cc @@ -1547,13 +1547,13 @@ dwarf2out_frame_debug_cfa_window_save (void) cur_row->window_save = true; } -/* A subroutine of dwarf2out_frame_debug, process a REG_CFA_TOGGLE_RA_MANGLE. +/* A subroutine of dwarf2out_frame_debug, process a REG_CFA_NEGATE_RA_STATE. Note: DW_CFA_GNU_window_save dwarf opcode is reused for toggling RA mangle state, this is a target specific operation on AArch64 and can only be used on other targets if they don't use the window save operation otherwise. */ static void -dwarf2out_frame_debug_cfa_toggle_ra_mangle (void) +dwarf2out_frame_debug_cfa_negate_ra_state (void) { dw_cfi_ref cfi = new_cfi (); @@ -2341,8 +2341,8 @@ dwarf2out_frame_debug (rtx_insn *insn) handled_one = true; break; - case REG_CFA_TOGGLE_RA_MANGLE: - dwarf2out_frame_debug_cfa_toggle_ra_mangle (); + case REG_CFA_NEGATE_RA_STATE: + dwarf2out_frame_debug_cfa_negate_ra_state (); handled_one = true; break; diff --git a/gcc/reg-notes.def b/gcc/reg-notes.def index 5b878fb2a1c..ddcf16b68be 100644 --- a/gcc/reg-notes.def +++ b/gcc/reg-notes.def @@ -180,10 +180,10 @@ REG_CFA_NOTE (CFA_WINDOW_SAVE) the rest of the compiler as a CALL_INSN. */ REG_CFA_NOTE (CFA_FLUSH_QUEUE) -/* Attached to insns that are RTX_FRAME_RELATED_P, toggling the mangling status - of return address. Currently it's only used by AArch64. The argument is - ignored. */ -REG_CFA_NOTE (CFA_TOGGLE_RA_MANGLE) +/* Attached to insns that are RTX_FRAME_RELATED_P, indicating an authentication + of the return address. Currently it's only used by AArch64. + The argument is ignored. */ +REG_CFA_NOTE (CFA_NEGATE_RA_STATE) /* Indicates what exception region an INSN belongs in. This is used to indicate what region to which a call may throw. REGION 0 From patchwork Wed Sep 18 14:05:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Longo X-Patchwork-Id: 1986832 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=iWwQNfVu; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=iWwQNfVu; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X80pp53S8z1y2j for ; Thu, 19 Sep 2024 00:07:46 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EB81E3858435 for ; Wed, 18 Sep 2024 14:07:44 +0000 (GMT) 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-dbaeur03on2062a.outbound.protection.outlook.com [IPv6:2a01:111:f403:260d::62a]) by sourceware.org (Postfix) with ESMTPS id B339E3858417 for ; Wed, 18 Sep 2024 14:06:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B339E3858417 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B339E3858417 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:260d::62a ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1726668396; cv=pass; b=r2VzT4HjKuaAJDg5bTkiyAmubwHTxZBi4Rq5Wcgm/hyt4EAH4zsvMjuL7VziNnE3D4RjIwsSMFFMEFE/nYA1h+0ygA+A1xO+F1FW8f82TIPrOUvo94YXytpgvSKKxATbgS8Pmgs0a00AFbE0lI0qNINjS+buSMC9pkRMIk9X+Jg= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1726668396; c=relaxed/simple; bh=u30KyABduiXZHoK0MynqjjxaHuEqCg/2m9idH5dESwE=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=qQ0zSsBKZ3+VWi9e6seUVhf58H7+5uon+jb6Cg9FSRA8Zzgcj9wDAzLDTXH2CLXOANE5IR8TrsIS8lZf1p96zj4AhNI9CzDV+G26+TC7KUVqse28zNk1Bq51IQ2n9OnLIsbtODkxCUyHkTbHiCDch1IVyiZZsSf8g+UrQ3pCEJo= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=f165LgIZKyLf4V22d4PO45QW5iW6VbQS85Z4lOn+2wle6T2cGAWhOGTL8E9sNTw/4GGyHvUoBMOwzu+gR7ApddPrI3i57grVbNq6NBAy/qoQrWXN7PI+gYk0uT8SJ/tjwKt7nvYXykyeLcxv4TZwVFPmcyv1LpptxNGjNSbXHONSOciFPXZaWyfyBmHfCzaz4TvqCLo9H5LxBnuUkWsFWrMRpDuHKVBAL5CTzWoc8J74OBB4j7MdngbEV16jI02T5Gcb1F1v+0ExfdoOp++UIJ0bcT+QGqQXNGveW6R5vGhFmbS9n30YpBcCA/yw0mmCRLg0LUq4PbZc88DW0fuWvA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=pMoXnSm8K52Fun3xst5fY6M7qFQik6mvFH3WOMR9bkc=; b=bgYevNlwi4DkazoXGk1VONRGjuFpHSRu8HHI+JU5h5p/kQNKNAO8oJofhqNUW1JAhtR8PrNYtGpRxeag2Q3fv5t3/ZgBpSeUlKOH39Uhg0BbOg2WG3ErYLlZsHuj+cwMRW12+RT1diI2ZR15N9EV6bDZvKhLqYCmSwdGnyIV11GVVfu7eWmbVUPwar0s+qErhhQwYEqVkKulXZmTFzXRtHCguiIjCMzkTpZEaJMbm2ORgj0Bk8nSVg61aOWZeTWwCrnH6CywZLg/aY3w0kNErCIxkexzQUCxH5tSwNxw9rxjcjOuT+Ys9f8Ladlna8AvfuYS7vD1sVVY9QE1vPetEQ== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pMoXnSm8K52Fun3xst5fY6M7qFQik6mvFH3WOMR9bkc=; b=iWwQNfVul1MY5wGwZtEBpZURARdZExLbWMS77He22J2xYzDAbSxEuSzvPyP77J+O3t/aETA/YiD6S9xEDMYZYYHA8v0ea0iv3sKBwNumoaTsimS2loF5zquq2VxxyMmzRFjIdP9Y+aC3mOgWwNkk3ZLVXib91/lk+RLmrdb7u/k= Received: from AM6P191CA0016.EURP191.PROD.OUTLOOK.COM (2603:10a6:209:8b::29) by GVXPR08MB10985.eurprd08.prod.outlook.com (2603:10a6:150:1f6::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.15; Wed, 18 Sep 2024 14:06:26 +0000 Received: from AMS0EPF0000019B.eurprd05.prod.outlook.com (2603:10a6:209:8b:cafe::1d) by AM6P191CA0016.outlook.office365.com (2603:10a6:209:8b::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.30 via Frontend Transport; Wed, 18 Sep 2024 14:06:26 +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=arm.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 AMS0EPF0000019B.mail.protection.outlook.com (10.167.16.247) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.7918.13 via Frontend Transport; Wed, 18 Sep 2024 14:06:26 +0000 Received: ("Tessian outbound 0881e36152ee:v457"); Wed, 18 Sep 2024 14:06:25 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 5b99ee1f4049f625 X-TessianGatewayMetadata: xHyOjwgjwJd97Q+abq9YXmdkCHzglzRt+nAfreaLCeUZrC29V1OulTnZUZC/nAQSmyTve+/NMXRev8FIngIeNxlLWXkya2jMjZ+90W/V27dimqVQmzAB0cZF57PzItvO/bMNr1dM5oXD4Sez0qfWSiRw47J747SPznVgvLQkDc8= X-CR-MTA-TID: 64aa7808 Received: from Lb29f3040803f.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 8DBA7CE9-AD1E-4626-A25E-1A42FF273D4E.1; Wed, 18 Sep 2024 14:06:19 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id Lb29f3040803f.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 18 Sep 2024 14:06:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=VrWtFwoNul3L7pPB/dkoO24g1kZ31sUtjbPV95ooWo/OKDE85bTppOWma6ZQYFKR913x+pC/iRCsKPICNDamLjNhRVT5UMoKr+YjMck3wywCwp1qEEOaQ7wDFOk68s3/IjRNEu53oWfNWPijgPdHKAK6oV9kmZS/iBHrIquy8ogxWHA0ArjpUPEdZUwxHyj/B9Nfj2lJ49UgKYxQlqpulNOnSCu8sxHiv5vFNsyzkrMnLQjBu7cb+zsqwp0l6e0qDFNEAS9e80QoUoZDxgH2hnkCHR2IMnU7R7jJpuSstxNKDXFQycr1XVJ54Zwnb67pMgbuQk2Lm1hPcNtZCRpQvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=pMoXnSm8K52Fun3xst5fY6M7qFQik6mvFH3WOMR9bkc=; b=eSVRDJSDgpZmRIXfi8MrzpsshSLZfTwSS4llx1RoNaQ76RxY3Gv4889BQM4IY3OVBHRFmCWQ2n6EcLlPj5JoiWd1k77byh7nEozpJrosE0ikGZe6cSSoZr6Ue5Pjlu5zMz8kKOUn4aYCywSIHoiPx9nh4gCq4sxOekU+cOiIy44TUubCuwmoJ4mGN4GpObvighM7BwIqtmTe0uDjyyqR9NGJLcu5rftu7bK5HkyCE3t9hBcBrgEB9WfmP1+3o6EvqUYM6qgkRsojPXOTrXFa/NWRC0EyB0di5CzVrPR5dGzCq2sFbskqmweXbVKe7tRQbbfuWBjd6fUA0c57pilP4A== 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 (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pMoXnSm8K52Fun3xst5fY6M7qFQik6mvFH3WOMR9bkc=; b=iWwQNfVul1MY5wGwZtEBpZURARdZExLbWMS77He22J2xYzDAbSxEuSzvPyP77J+O3t/aETA/YiD6S9xEDMYZYYHA8v0ea0iv3sKBwNumoaTsimS2loF5zquq2VxxyMmzRFjIdP9Y+aC3mOgWwNkk3ZLVXib91/lk+RLmrdb7u/k= Received: from AS4P190CA0047.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:656::11) by DB9PR08MB9707.eurprd08.prod.outlook.com (2603:10a6:10:45d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.16; Wed, 18 Sep 2024 14:06:13 +0000 Received: from AMS0EPF000001B6.eurprd05.prod.outlook.com (2603:10a6:20b:656:cafe::33) by AS4P190CA0047.outlook.office365.com (2603:10a6:20b:656::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.30 via Frontend Transport; Wed, 18 Sep 2024 14:06:13 +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 AMS0EPF000001B6.mail.protection.outlook.com (10.167.16.170) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7918.13 via Frontend Transport; Wed, 18 Sep 2024 14:06:13 +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.39; Wed, 18 Sep 2024 14:05:59 +0000 Received: from PW070M4K.cambridge.arm.com (10.57.76.20) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Wed, 18 Sep 2024 14:05:58 +0000 From: Matthieu Longo To: CC: Richard Earnshaw , Richard Sandiford , "David S . Miller" , "Eric Botcazou" , Jason Merrill , "Cary Coutant" , Jakub Jelinek , "Matthieu Longo" Subject: [PATCH v2 2/4] dwarf2: add hooks for architecture-specific CFIs Date: Wed, 18 Sep 2024 15:05:33 +0100 Message-ID: <20240918140535.1538392-3-matthieu.longo@arm.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240918140535.1538392-1-matthieu.longo@arm.com> References: <20240918140535.1538392-1-matthieu.longo@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AMS0EPF000001B6:EE_|DB9PR08MB9707:EE_|AMS0EPF0000019B:EE_|GVXPR08MB10985:EE_ X-MS-Office365-Filtering-Correlation-Id: c137f776-0300-42ff-e9fe-08dcd7eb15e6 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|36860700013|1800799024|376014|82310400026|41080700001; X-Microsoft-Antispam-Message-Info-Original: X780ud28nP4VHU9Xfoq0rw5SsVykQ/yVDF8OpB35VsPqDW9QITmdcCZ3TEm1mqDMO25SNlQtFrFpM8PuvZSiZCI/LYUEfUOi44Rr4Sf3InwE2yPeRhEtW0dP/Ph62xNfzExBIxYjojZ9oh3W6+098922OyU+ZCoAVQh6hmWb4oGOMhWhMe13U0vmDYAso788IS6f13zmVbVHBe8IDQwaZr8wUaNCnUkNWGPhYlrUPFQBj1U0cHPutn8ryKCzEx2aQM1LDNly5vLSm7kd34C06VWtmwQfRIC0ROCJcQI96pYxlirQdy6iPidp6WWDLXnEP/W8DzOi1JtXMeTTPoT3JqEnJrnlRs3Ue9KQC7AoN4rMeERz1Jkopf4NEMlP9FMA1cIYE6PSfUNGR2YBAuBqW1SP77qu4S5eNDwWZ8bikfSQI8HzGPSf0r158xDAhyxL1M5muBdAybIoXsCec43JDkvdYc1ejcz4AiHluetCPwwG4JLS+5+OBFiaJ5VELOg1hylT2Ji4MS2ksCsrM2M9imhunv93CEeW7kJdqAGTUvTA5LOs2ojjWg0zPrVQNJzS7VRGBr5vERLlAKPG1yQz19x/2Rixj1Y8Quqe6BzY+4n642ka+DC6KjP+kF0n2p1Oak1vGQ6eYO5kf4q7vlYDNeq/elaK/ImEjeoIh9KzoR6uemXj5h0vuHdzVbC/Z0NkE3dYX0nhOIMIO4ObMGU8GLUj0fywshmwr8P1n4U6O/U69CLgc+dYwvtNJ/jPj/i4CUiYiH50u4ciyIwLjWEutJKxXGzSZECgs5H1jn+gQH4PTAyeR+OPDIai+xVKv0Be36QGaM9V7I2pWIHj+8j+DLA+DMGYLPfl50iqi9krzZEp7kDSavp5y91+//yMdwDYDt+NTD5okoA2KeKjEZijWaKhjv3w0dB3eiATGCb57gge1Ph8urAN4o1fKRg5BddGHF1ptKNZElg0mNZJmVJp+RfaRfSlVYeiEkvY4dfz8Oy3exm51x9SlcgyDz0C5DpZDIgOmp5gkNCVVdCPfNs9JwttLeRAFsX85Jwl0otbMcKiXz9yojyeRQpRtkfoDAe8Xxd6LI7AYIAg4PgxhrgMyrGoW4fGKtvq/ey3vPQE5RcCeIM6qdCFQ+3k36XZT8phQnVfu1DDpHrEhcOBUZvORvoWhHWlMS/rg/foY7onxSOGOO/rbXTuhkZtj/Boxf/kXwdcrUJ087MWZ7jQaQNekehqRosc/JDhqiM2n/3d3eyd1srin/psz3srCMN+/ibjq0mEeH46XJLUIE88w97YLmN52hE2EhQP2i0+hyuXN2cK4O//bAam6IuP4fC6HTzObeorogwh5CQUlHK3lbscC1OupOnwptDrSNvHz3sCI7SPogjn9X7JA9Go6+Afj8klblQQsnahkfEZGHutDOyteAqf2Ui/DVuKJjVy8p/TBz0= 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:(13230040)(36860700013)(1800799024)(376014)(82310400026)(41080700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB9707 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:20b:656::11]; domain=AS4P190CA0047.EURP190.PROD.OUTLOOK.COM X-MS-Exchange-Transport-CrossTenantHeadersStripped: AMS0EPF0000019B.eurprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 51b096e2-46ee-45ec-c2b7-08dcd7eb0e37 X-Microsoft-Antispam: BCL:0; ARA:13230040|35042699022|376014|1800799024|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: I8PZMmD9UODU1+m380uXBH9JEWp8IzVStVZRzXc9uy2JUR0gm22RZr3uPUOd0hDzW9lNuTXdX8GTY0G+Zrubl0l+JPyuWxptUqq2H0v6+VdQa2hI7VwOpMjY6EpqnQ45UR8FhhUpKguS+AnxMsSC+TUCCCvGUcpLrhJdq8fdoTllo8jV0sSJL3GJnDBqDl5Hi7XC41UKRB0NjAjJqiE7wRMLrIMw1dvFXfeP53ZHR6g/WMmn9p5GW7wc3Fq5xpBWYse0y16UG0jr2dVtZxamLyrpFXk/+E/Qb9kXDPhkhRFVfqHbxIiaB8WdpXink7dtnNbDgpCt6LaJobyh1R+caBpjjg1hVjyG/UGKhFuZ3br07IUese3uwJzpmQ0upF6VUkfsOVuubTNfKoSpnu5RLGnFqjq4dsbPOVviX4XmZuqfw35R5e86JIs51Qn+AOS7MQ19M5eBoKosLtd8MszgrjT7WdZBPykZKUBUQLY0iQuTEEY0t2QaCC6yBQ0YAuWfBFXvsVeaFJ06xby4QyS98722UAF9XF6CRIdGqAMAYxleV6WSBjAOkL8SVB2W0z35TANmTPaNk1A6g2qEcqoNwt3f2Mvjg76x/ahYkvsEvV3JFn0EM0YJmz1XM3SkmCXEHg3BJbdTdFZOCPycnzuqZP1dlKAQGakt2VS1l7cn3EC2p9w69v4joy/Cylb43wmSgn1HGWmPFG94DBlTd8fQmjqge+OXaj2fehxnfwAEU2XmVNe2Qq433HogyQskhpsbmKB5rAFQwKRh4QnaetVdpmQZ582aDA+HgysUtOq7yX1yc0UIadQ8ZoQ81FI2tgzynXnVoq+QyLiqEtnk6pT1w8ziAoslqdK1CvjMI7qXEqVIug8R+lq/8N+Le6sI29wZagnDWALy/4AaVA42FQWnJ02wPANySfcQCQUQuv0mFN2ou7ROKSRndOoUJ9bt+n/iZeulPo22STLdo3N6mEVhb2wSeJSxlO9Ncg7x8/0vyNmhCdfhc2SaiQ+6W34kwqhOrN5jnniPnjMeoWj5yoyBfOQz1IM6pCeiObfoo+HWqD9hQ+BIhcEBTxKiq320CANqGI9+Fa8a9+WYdcOv0HUWCcocNZZ0421MADLHkUfRZogW9pN97mKX85lx2H/hejlISdsq7UwN9L4KOm3TxJzncyizeD5ldoJQOT0N97h3iD4YTHXc1Gol8uRY47hcCbuDHQfjZMbqVct3c7Vj/raF1L3jKnI3t3LJZzi//tsHPZCQh+v6JMm5tw+X2Li+aaSsu7eL7U48B3l9cZQd0V8gqJ12ErqlteDVqzt8KWUJaakw7P8TNCfvZD01RZxDwUzflXP89tK0r5AsKAO+OHH/tKGRRMFLsea/2maug315dJFPbQ6V7K5oH+rTqtrgF0aA 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:(13230040)(35042699022)(376014)(1800799024)(36860700013)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2024 14:06:26.3727 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c137f776-0300-42ff-e9fe-08dcd7eb15e6 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: AMS0EPF0000019B.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR08MB10985 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_NONE, TXREP, T_FILL_THIS_FORM_SHORT, 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org Architecture-specific CFI directives are currently declared an processed among others architecture-independent CFI directives in gcc/dwarf2* files. This approach creates confusion, specifically in the case of DWARF instructions in the vendor space and using the same instruction code. Such a clash currently happen between DW_CFA_GNU_window_save (used on SPARC) and DW_CFA_AARCH64_negate_ra_state (used on AArch64), and both having the same instruction code 0x2d. Then AArch64 compilers generates a SPARC CFI directive (.cfi_window_save) instead of .cfi_negate_ra_state, contrarilly to what is expected in [DWARF for the Arm 64-bit Architecture (AArch64)](https://github.com/ ARM-software/abi-aa/blob/main/aadwarf64/aadwarf64.rst). This refactoring does not solve completely the problem, but improve the situation by moving some of the processing of those directives (more specifically their output in the assembly) to the backend via 2 target hooks: - DW_CFI_OPRND1_DESC: parse the first operand of the directive (if any). - OUTPUT_CFI_DIRECTIVE: output the CFI directive as a string. Additionally, this patch also contains a renaming of an enum used for return address mangling on AArch64. gcc/ChangeLog: * config/aarch64/aarch64.cc (aarch64_output_cfi_directive): New hook for CFI directives. (aarch64_dw_cfi_oprnd1_desc): Same. (TARGET_OUTPUT_CFI_DIRECTIVE): Hook for output_cfi_directive. (TARGET_DW_CFI_OPRND1_DESC): Hook for dw_cfi_oprnd1_desc. * config/sparc/sparc.cc (sparc_output_cfi_directive): New hook for CFI directives. (sparc_dw_cfi_oprnd1_desc): Same. (TARGET_OUTPUT_CFI_DIRECTIVE): Hook for output_cfi_directive. (TARGET_DW_CFI_OPRND1_DESC): Hook for dw_cfi_oprnd1_desc. * coretypes.h (struct dw_cfi_node): Forward declaration of CFI type from gcc/dwarf2out.h. (enum dw_cfi_oprnd_type): Same. (enum dwarf_call_frame_info): Same. * doc/tm.texi: Regenerated from doc/tm.texi.in. * doc/tm.texi.in: Add doc for new target hooks. * dwarf2.h (enum dwarf_call_frame_info): specify underlying type of enum to allow forward declaration. * dwarf2cfi.cc (struct dw_cfi_row): Update the description for window_save and ra_mangled. (dwarf2out_frame_debug_cfa_negate_ra_state): Use AArch64 CFI directive instead of the SPARC one. (change_cfi_row): Use the right CFI directive's name for RA mangling. (output_cfi): Remove explicit architecture-specific CFI directive DW_CFA_GNU_window_save that falls into default case. (output_cfi_directive): Use target hook as default. * dwarf2out.cc (dw_cfi_oprnd1_desc): Use target hook as default. * dwarf2out.h (enum dw_cfi_oprnd_type): specify underlying type of enum to allow forward declaration. (dw_cfi_oprnd1_desc): Call target hook. (output_cfi_directive): Use dw_cfi_ref instead of struct dw_cfi_node *. * hooks.cc (hook_bool_dwcfi_dwcfioprndtyperef_false): New. (hook_bool_FILEptr_dwcfiptr_false): New. * hooks.h (hook_bool_dwcfi_dwcfioprndtyperef_false): New. (hook_bool_FILEptr_dwcfiptr_false): New. * target.def: Documentation for new hooks. libffi/ChangeLog: * include/ffi_cfi.h (cfi_negate_ra_state): Declare AArch64 cfi directive. libgcc/ChangeLog: * config/aarch64/aarch64-asm.h (PACIASP): Replace SPARC CFI directive by AArch64 one. (AUTIASP): Same. libitm/ChangeLog: * config/aarch64/sjlj.S: Replace SPARC CFI directive by AArch64 one. gcc/testsuite/ChangeLog: * g++.target/aarch64/pr94515-1.C: Replace SPARC CFI directive by AArch64 one. * g++.target/aarch64/pr94515-2.C: Same. --- gcc/config/aarch64/aarch64.cc | 33 ++++++++++++++++++ gcc/config/sparc/sparc.cc | 35 ++++++++++++++++++++ gcc/coretypes.h | 6 ++++ gcc/doc/tm.texi | 16 ++++++++- gcc/doc/tm.texi.in | 5 ++- gcc/dwarf2cfi.cc | 31 ++++++----------- gcc/dwarf2out.cc | 13 +++++--- gcc/dwarf2out.h | 11 +++--- gcc/hooks.cc | 14 ++++++++ gcc/hooks.h | 3 ++ gcc/target.def | 20 +++++++++++ gcc/testsuite/g++.target/aarch64/pr94515-1.C | 6 ++-- gcc/testsuite/g++.target/aarch64/pr94515-2.C | 2 +- include/dwarf2.h | 5 +++ libffi/include/ffi_cfi.h | 2 ++ libgcc/config/aarch64/aarch64-asm.h | 4 +-- libitm/config/aarch64/sjlj.S | 10 +++--- 17 files changed, 171 insertions(+), 45 deletions(-) diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc index acb2ddb9170..2e33f96749a 100644 --- a/gcc/config/aarch64/aarch64.cc +++ b/gcc/config/aarch64/aarch64.cc @@ -60,6 +60,7 @@ #include "opts.h" #include "gimplify.h" #include "dwarf2.h" +#include "dwarf2out.h" #include "gimple-iterator.h" #include "tree-vectorizer.h" #include "aarch64-cost-tables.h" @@ -1450,6 +1451,32 @@ aarch64_dwarf_frame_reg_mode (int regno) return default_dwarf_frame_reg_mode (regno); } +/* Implement TARGET_OUTPUT_CFI_DIRECTIVE. */ +static bool +aarch64_output_cfi_directive (FILE *f, dw_cfi_ref cfi) +{ + bool found = false; + if (cfi->dw_cfi_opc == DW_CFA_AARCH64_negate_ra_state) + { + fprintf (f, "\t.cfi_negate_ra_state\n"); + found = true; + } + return found; +} + +/* Implement TARGET_DW_CFI_OPRND1_DESC. */ +static bool +aarch64_dw_cfi_oprnd1_desc (dwarf_call_frame_info cfi_opc, + dw_cfi_oprnd_type &oprnd_type) +{ + if (cfi_opc == DW_CFA_AARCH64_negate_ra_state) + { + oprnd_type = dw_cfi_oprnd_unused; + return true; + } + return false; +} + /* If X is a CONST_DOUBLE, return its bit representation as a constant integer, otherwise return X unmodified. */ static rtx @@ -30822,6 +30849,12 @@ aarch64_libgcc_floating_mode_supported_p #undef TARGET_DWARF_FRAME_REG_MODE #define TARGET_DWARF_FRAME_REG_MODE aarch64_dwarf_frame_reg_mode +#undef TARGET_OUTPUT_CFI_DIRECTIVE +#define TARGET_OUTPUT_CFI_DIRECTIVE aarch64_output_cfi_directive + +#undef TARGET_DW_CFI_OPRND1_DESC +#define TARGET_DW_CFI_OPRND1_DESC aarch64_dw_cfi_oprnd1_desc + #undef TARGET_PROMOTED_TYPE #define TARGET_PROMOTED_TYPE aarch64_promoted_type diff --git a/gcc/config/sparc/sparc.cc b/gcc/config/sparc/sparc.cc index 3a4c13a14e5..4bc249da825 100644 --- a/gcc/config/sparc/sparc.cc +++ b/gcc/config/sparc/sparc.cc @@ -61,6 +61,7 @@ along with GCC; see the file COPYING3. If not see #include "builtins.h" #include "tree-vector-builder.h" #include "opts.h" +#include "dwarf2out.h" /* This file should be included last. */ #include "target-def.h" @@ -681,6 +682,9 @@ static rtx sparc_libcall_value (machine_mode, const_rtx); static bool sparc_function_value_regno_p (const unsigned int); static unsigned HOST_WIDE_INT sparc_asan_shadow_offset (void); static void sparc_output_dwarf_dtprel (FILE *, int, rtx) ATTRIBUTE_UNUSED; +static bool sparc_output_cfi_directive (FILE *, dw_cfi_ref); +static bool sparc_dw_cfi_oprnd1_desc (dwarf_call_frame_info, + dw_cfi_oprnd_type &); static void sparc_file_end (void); static bool sparc_frame_pointer_required (void); static bool sparc_can_eliminate (const int, const int); @@ -878,6 +882,12 @@ char sparc_hard_reg_printed[8]; #define TARGET_ASM_OUTPUT_DWARF_DTPREL sparc_output_dwarf_dtprel #endif +#undef TARGET_OUTPUT_CFI_DIRECTIVE +#define TARGET_OUTPUT_CFI_DIRECTIVE sparc_output_cfi_directive + +#undef TARGET_DW_CFI_OPRND1_DESC +#define TARGET_DW_CFI_OPRND1_DESC sparc_dw_cfi_oprnd1_desc + #undef TARGET_ASM_FILE_END #define TARGET_ASM_FILE_END sparc_file_end @@ -12621,6 +12631,31 @@ sparc_output_dwarf_dtprel (FILE *file, int size, rtx x) fputs (")", file); } +/* Implement TARGET_OUTPUT_CFI_DIRECTIVE. */ +static bool +sparc_output_cfi_directive (FILE *f, dw_cfi_ref cfi) +{ + if (cfi->dw_cfi_opc == DW_CFA_GNU_window_save) + { + fprintf (f, "\t.cfi_window_save\n"); + return true; + } + return false; +} + +/* Implement TARGET_DW_CFI_OPRND1_DESC. */ +static bool +sparc_dw_cfi_oprnd1_desc (dwarf_call_frame_info cfi_opc, + dw_cfi_oprnd_type &oprnd_type) +{ + if (cfi_opc == DW_CFA_GNU_window_save) + { + oprnd_type = dw_cfi_oprnd_unused; + return true; + } + return false; +} + /* Do whatever processing is required at the end of a file. */ static void diff --git a/gcc/coretypes.h b/gcc/coretypes.h index 0544bb8fd97..991312534cd 100644 --- a/gcc/coretypes.h +++ b/gcc/coretypes.h @@ -141,6 +141,12 @@ struct gomp_single; struct gomp_target; struct gomp_teams; +/* Forward declaration of CFI's and DWARF's types. */ +struct dw_cfi_node; +using dw_cfi_ref = struct dw_cfi_node *; +enum dw_cfi_oprnd_type: int; +enum dwarf_call_frame_info: int; + /* Subclasses of symtab_node, using indentation to show the class hierarchy. */ diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index cc33084ed32..d4ebe36b0ff 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -3911,7 +3911,6 @@ used in .eh_frame or .debug_frame is different from that used in other debug info sections. Given a GCC hard register number, this macro should return the .eh_frame register number. The default is @code{DEBUGGER_REGNO (@var{regno})}. - @end defmac @defmac DWARF2_FRAME_REG_OUT (@var{regno}, @var{for_eh}) @@ -10050,6 +10049,21 @@ used to return a smaller mode than the raw mode to prevent call clobbered parts of a register altering the frame register size @end deftypefn +@deftypefn {Target Hook} bool TARGET_OUTPUT_CFI_DIRECTIVE (FILE * @var{f}, dw_cfi_ref @var{cfi}) +This hook handles architecture-specific CFI directives and prints +them out to the assembly file @var{f}. +Return true if a architecture-specific directive was found, false +otherwise. +@end deftypefn + +@deftypefn {Target Hook} bool TARGET_DW_CFI_OPRND1_DESC (dwarf_call_frame_info @var{cfi_opc}, dw_cfi_oprnd_type & @var{oprnd_type}) +This hook informs the caller what the architecture-specific directives +takes as a first operand. +Return true if a architecture-specific directive was found and +@var{oprnd_type} is set, false otherwise and @var{oprnd_type} is not +modified. +@end deftypefn + @deftypefn {Target Hook} void TARGET_INIT_DWARF_REG_SIZES_EXTRA (tree @var{address}) If some registers are represented in Dwarf-2 unwind information in multiple pieces, define this hook to fill in information about the diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in index 8af3f414505..36541cbcc09 100644 --- a/gcc/doc/tm.texi.in +++ b/gcc/doc/tm.texi.in @@ -3108,7 +3108,6 @@ used in .eh_frame or .debug_frame is different from that used in other debug info sections. Given a GCC hard register number, this macro should return the .eh_frame register number. The default is @code{DEBUGGER_REGNO (@var{regno})}. - @end defmac @defmac DWARF2_FRAME_REG_OUT (@var{regno}, @var{for_eh}) @@ -6614,6 +6613,10 @@ the target supports DWARF 2 frame unwind information. @hook TARGET_DWARF_FRAME_REG_MODE +@hook TARGET_OUTPUT_CFI_DIRECTIVE + +@hook TARGET_DW_CFI_OPRND1_DESC + @hook TARGET_INIT_DWARF_REG_SIZES_EXTRA @hook TARGET_ASM_TTYPE diff --git a/gcc/dwarf2cfi.cc b/gcc/dwarf2cfi.cc index 4ad9acbd6fd..f8d19d52429 100644 --- a/gcc/dwarf2cfi.cc +++ b/gcc/dwarf2cfi.cc @@ -69,10 +69,12 @@ struct GTY(()) dw_cfi_row /* The expressions for any register column that is saved. */ cfi_vec reg_save; - /* True if the register window is saved. */ + /* SPARC extension for DW_CFA_GNU_window_save. + True if the register window is saved. */ bool window_save; - /* True if the return address is in a mangled state. */ + /* AArch64 extension for DW_CFA_AARCH64_negate_ra_state. + True if the return address is in a mangled state. */ bool ra_mangled; }; @@ -801,8 +803,6 @@ cfi_oprnd_equal_p (enum dw_cfi_oprnd_type t, dw_cfi_oprnd *a, dw_cfi_oprnd *b) static bool cfi_equal_p (dw_cfi_ref a, dw_cfi_ref b) { - enum dwarf_call_frame_info opc; - /* Make things easier for our callers, including missing operands. */ if (a == b) return true; @@ -810,7 +810,7 @@ cfi_equal_p (dw_cfi_ref a, dw_cfi_ref b) return false; /* Obviously, the opcodes must match. */ - opc = a->dw_cfi_opc; + dwarf_call_frame_info opc = a->dw_cfi_opc; if (opc != b->dw_cfi_opc) return false; @@ -1547,17 +1547,13 @@ dwarf2out_frame_debug_cfa_window_save (void) cur_row->window_save = true; } -/* A subroutine of dwarf2out_frame_debug, process a REG_CFA_NEGATE_RA_STATE. - Note: DW_CFA_GNU_window_save dwarf opcode is reused for toggling RA mangle - state, this is a target specific operation on AArch64 and can only be used - on other targets if they don't use the window save operation otherwise. */ +/* A subroutine of dwarf2out_frame_debug, process REG_CFA_NEGATE_RA_STATE. */ static void dwarf2out_frame_debug_cfa_negate_ra_state (void) { dw_cfi_ref cfi = new_cfi (); - - cfi->dw_cfi_opc = DW_CFA_GNU_window_save; + cfi->dw_cfi_opc = DW_CFA_AARCH64_negate_ra_state; add_cfi (cfi); cur_row->ra_mangled = !cur_row->ra_mangled; } @@ -2426,8 +2422,7 @@ change_cfi_row (dw_cfi_row *old_row, dw_cfi_row *new_row) dw_cfi_ref cfi = new_cfi (); gcc_assert (!old_row->window_save && !new_row->window_save); - /* DW_CFA_GNU_window_save is reused for toggling RA mangle state. */ - cfi->dw_cfi_opc = DW_CFA_GNU_window_save; + cfi->dw_cfi_opc = DW_CFA_AARCH64_negate_ra_state; add_cfi (cfi); } } @@ -3516,9 +3511,6 @@ output_cfi (dw_cfi_ref cfi, dw_fde_ref fde, int for_eh) dw2_asm_output_data_sleb128 (off, NULL); break; - case DW_CFA_GNU_window_save: - break; - case DW_CFA_def_cfa_expression: case DW_CFA_expression: case DW_CFA_val_expression: @@ -3631,10 +3623,6 @@ output_cfi_directive (FILE *f, dw_cfi_ref cfi) } break; - case DW_CFA_GNU_window_save: - fprintf (f, "\t.cfi_window_save\n"); - break; - case DW_CFA_def_cfa_expression: case DW_CFA_expression: case DW_CFA_val_expression: @@ -3651,7 +3639,8 @@ output_cfi_directive (FILE *f, dw_cfi_ref cfi) break; default: - gcc_unreachable (); + if (!targetm.output_cfi_directive (f, cfi)) + gcc_unreachable (); } } diff --git a/gcc/dwarf2out.cc b/gcc/dwarf2out.cc index a7ec359bd0c..38aedb64470 100644 --- a/gcc/dwarf2out.cc +++ b/gcc/dwarf2out.cc @@ -516,12 +516,11 @@ switch_to_frame_table_section (int for_eh, bool back) /* Describe for the GTY machinery what parts of dw_cfi_oprnd1 are used. */ enum dw_cfi_oprnd_type -dw_cfi_oprnd1_desc (enum dwarf_call_frame_info cfi) +dw_cfi_oprnd1_desc (dwarf_call_frame_info cfi) { switch (cfi) { case DW_CFA_nop: - case DW_CFA_GNU_window_save: case DW_CFA_remember_state: case DW_CFA_restore_state: return dw_cfi_oprnd_unused; @@ -557,14 +556,20 @@ dw_cfi_oprnd1_desc (enum dwarf_call_frame_info cfi) return dw_cfi_oprnd_loc; default: - gcc_unreachable (); + { + dw_cfi_oprnd_type oprnd_type; + if (targetm.dw_cfi_oprnd1_desc (cfi, oprnd_type)) + return oprnd_type; + else + gcc_unreachable (); + } } } /* Describe for the GTY machinery what parts of dw_cfi_oprnd2 are used. */ enum dw_cfi_oprnd_type -dw_cfi_oprnd2_desc (enum dwarf_call_frame_info cfi) +dw_cfi_oprnd2_desc (dwarf_call_frame_info cfi) { switch (cfi) { diff --git a/gcc/dwarf2out.h b/gcc/dwarf2out.h index ded1697ecf6..27919594bef 100644 --- a/gcc/dwarf2out.h +++ b/gcc/dwarf2out.h @@ -37,8 +37,7 @@ typedef struct dw_wide_int *dw_wide_int_ptr; Information instructions. The register number, offset and address fields are provided as possible operands; their use is selected by the opcode field. */ - -enum dw_cfi_oprnd_type { +enum dw_cfi_oprnd_type: int { dw_cfi_oprnd_unused, dw_cfi_oprnd_reg_num, dw_cfi_oprnd_offset, @@ -405,12 +404,10 @@ extern void output_cfi (dw_cfi_ref, dw_fde_ref, int); extern GTY(()) cfi_vec cie_cfi_vec; /* Interface from dwarf2*.c to the rest of the compiler. */ -extern enum dw_cfi_oprnd_type dw_cfi_oprnd1_desc - (enum dwarf_call_frame_info cfi); -extern enum dw_cfi_oprnd_type dw_cfi_oprnd2_desc - (enum dwarf_call_frame_info cfi); +extern enum dw_cfi_oprnd_type dw_cfi_oprnd1_desc (dwarf_call_frame_info cfi); +extern enum dw_cfi_oprnd_type dw_cfi_oprnd2_desc (dwarf_call_frame_info cfi); -extern void output_cfi_directive (FILE *f, struct dw_cfi_node *cfi); +extern void output_cfi_directive (FILE *f, dw_cfi_ref cfi); extern void dwarf2out_emit_cfi (dw_cfi_ref cfi); diff --git a/gcc/hooks.cc b/gcc/hooks.cc index 28769074222..4eb3d32d978 100644 --- a/gcc/hooks.cc +++ b/gcc/hooks.cc @@ -62,6 +62,20 @@ hook_bool_bool_gcc_optionsp_false (bool, struct gcc_options *) return false; } +/* Generic hook that takes (dwarf_call_frame_info, dw_cfi_oprnd_type &) and + return false. */ +bool hook_bool_dwcfi_dwcfioprndtyperef_false (dwarf_call_frame_info, + dw_cfi_oprnd_type &) +{ + return false; +} + +/* Generic hook that takes (FILE *, dw_cfi_ref) and return false. */ +bool hook_bool_FILEptr_dwcfiptr_false (FILE *, dw_cfi_ref) +{ + return false; +} + /* Generic hook that takes const int, const int) and returns true. */ bool hook_bool_const_int_const_int_true (const int, const int) { diff --git a/gcc/hooks.h b/gcc/hooks.h index 924748420e6..3b84a7d564e 100644 --- a/gcc/hooks.h +++ b/gcc/hooks.h @@ -27,6 +27,9 @@ extern bool hook_bool_void_false (void); extern bool hook_bool_void_true (void); extern bool hook_bool_bool_false (bool); extern bool hook_bool_bool_gcc_optionsp_false (bool, struct gcc_options *); +extern bool hook_bool_dwcfi_dwcfioprndtyperef_false (dwarf_call_frame_info, + dw_cfi_oprnd_type &); +extern bool hook_bool_FILEptr_dwcfiptr_false (FILE *, dw_cfi_ref); extern bool hook_bool_const_int_const_int_true (const int, const int); extern bool hook_bool_mode_false (machine_mode); extern bool hook_bool_mode_true (machine_mode); diff --git a/gcc/target.def b/gcc/target.def index 1d0ea6f30ca..b3155010888 100644 --- a/gcc/target.def +++ b/gcc/target.def @@ -4127,6 +4127,26 @@ clobbered parts of a register altering the frame register size", machine_mode, (int regno), default_dwarf_frame_reg_mode) +/* Print out architecture-specific CFI directives to the assembly file. */ +DEFHOOK +(output_cfi_directive, + "This hook handles architecture-specific CFI directives and prints\n\ +them out to the assembly file @var{f}.\n\ +Return true if a architecture-specific directive was found, false\n\ +otherwise.", + bool, (FILE * f, dw_cfi_ref cfi), + hook_bool_FILEptr_dwcfiptr_false) + +DEFHOOK +(dw_cfi_oprnd1_desc, + "This hook informs the caller what the architecture-specific directives\n\ +takes as a first operand.\n\ +Return true if a architecture-specific directive was found and\n\ +@var{oprnd_type} is set, false otherwise and @var{oprnd_type} is not\n\ +modified.", + bool, (dwarf_call_frame_info cfi_opc, dw_cfi_oprnd_type & oprnd_type), + hook_bool_dwcfi_dwcfioprndtyperef_false) + /* If expand_builtin_init_dwarf_reg_sizes needs to fill in table entries not corresponding directly to registers below FIRST_PSEUDO_REGISTER, this hook should generate the necessary diff --git a/gcc/testsuite/g++.target/aarch64/pr94515-1.C b/gcc/testsuite/g++.target/aarch64/pr94515-1.C index 20ae81215fc..d5c114a83a8 100644 --- a/gcc/testsuite/g++.target/aarch64/pr94515-1.C +++ b/gcc/testsuite/g++.target/aarch64/pr94515-1.C @@ -1,4 +1,4 @@ -/* PR target/94515. Check .cfi_window_save with multiple return paths. */ +/* PR target/94515. Check .cfi_negate_ra_state with multiple return paths. */ /* { dg-do run } */ /* { dg-require-effective-target lp64 } */ /* { dg-additional-options "-O2 --save-temps" } */ @@ -38,7 +38,7 @@ int main () } /* This check only works if there are two return paths in test and - cfi_window_save is used for both instead of cfi_remember_state + cfi_negate_ra_state is used for both instead of cfi_remember_state plus cfi_restore_state. This is currently the case with -O2. */ -/* { dg-final { scan-assembler-times {\t\.cfi_window_save\n} 4 } } */ +/* { dg-final { scan-assembler-times {\t\.cfi_negate_ra_state\n} 4 } } */ diff --git a/gcc/testsuite/g++.target/aarch64/pr94515-2.C b/gcc/testsuite/g++.target/aarch64/pr94515-2.C index e73df499070..f4a3333beed 100644 --- a/gcc/testsuite/g++.target/aarch64/pr94515-2.C +++ b/gcc/testsuite/g++.target/aarch64/pr94515-2.C @@ -1,4 +1,4 @@ -/* PR target/94515. Check .cfi_window_save with multiple return paths. */ +/* PR target/94515. Check .cfi_negate_ra_state with multiple return paths. */ /* { dg-do run } */ /* { dg-require-effective-target lp64 } */ /* { dg-additional-options "-O2 -mbranch-protection=pac-ret" } */ diff --git a/include/dwarf2.h b/include/dwarf2.h index b3d3731ee83..7235575f74b 100644 --- a/include/dwarf2.h +++ b/include/dwarf2.h @@ -72,8 +72,13 @@ #define DW_FIRST_ATE(name, value) enum dwarf_type { \ name = value #define DW_END_ATE }; +#ifdef __cplusplus +#define DW_FIRST_CFA(name, value) enum dwarf_call_frame_info: int { \ + name = value +#else #define DW_FIRST_CFA(name, value) enum dwarf_call_frame_info { \ name = value +#endif #define DW_END_CFA }; #define DW_FIRST_IDX(name, value) enum dwarf_name_index_attribute { \ name = value diff --git a/libffi/include/ffi_cfi.h b/libffi/include/ffi_cfi.h index f4c292d0040..2beb165c9a1 100644 --- a/libffi/include/ffi_cfi.h +++ b/libffi/include/ffi_cfi.h @@ -46,6 +46,7 @@ # define cfi_remember_state .cfi_remember_state # define cfi_restore_state .cfi_restore_state # define cfi_window_save .cfi_window_save +# define cfi_negate_ra_state .cfi_negate_ra_state # define cfi_personality(enc, exp) .cfi_personality enc, exp # define cfi_lsda(enc, exp) .cfi_lsda enc, exp # define cfi_escape(...) .cfi_escape __VA_ARGS__ @@ -68,6 +69,7 @@ # define cfi_remember_state # define cfi_restore_state # define cfi_window_save +# define cfi_negate_ra_state # define cfi_personality(enc, exp) # define cfi_lsda(enc, exp) # define cfi_escape(...) diff --git a/libgcc/config/aarch64/aarch64-asm.h b/libgcc/config/aarch64/aarch64-asm.h index 83c2e5944b3..d8ab91d52f1 100644 --- a/libgcc/config/aarch64/aarch64-asm.h +++ b/libgcc/config/aarch64/aarch64-asm.h @@ -50,8 +50,8 @@ #if __ARM_FEATURE_PAC_DEFAULT & 3 # define PAC_FLAG FEATURE_1_PAC -# define PACIASP hint 25; .cfi_window_save -# define AUTIASP hint 29; .cfi_window_save +# define PACIASP hint 25; .cfi_negate_ra_state +# define AUTIASP hint 29; .cfi_negate_ra_state #else # define PAC_FLAG 0 # define PACIASP diff --git a/libitm/config/aarch64/sjlj.S b/libitm/config/aarch64/sjlj.S index 6b248f7c040..aeffd4d1070 100644 --- a/libitm/config/aarch64/sjlj.S +++ b/libitm/config/aarch64/sjlj.S @@ -31,20 +31,20 @@ #define AUTIBSP hint 31 #if defined(HAVE_AS_CFI_PSEUDO_OP) && defined(__GCC_HAVE_DWARF2_CFI_ASM) -# define cfi_window_save .cfi_window_save -# define cfi_b_key_frame .cfi_b_key_frame +# define cfi_negate_ra_state .cfi_negate_ra_state +# define cfi_b_key_frame .cfi_b_key_frame #else -# define cfi_window_save +# define cfi_negate_ra_state # define cfi_b_key_frame #endif #if __ARM_FEATURE_PAC_DEFAULT & 1 -# define CFI_PAC_TOGGLE cfi_window_save +# define CFI_PAC_TOGGLE cfi_negate_ra_state # define CFI_PAC_KEY # define PAC_AND_BTI PACIASP # define AUT AUTIASP #elif __ARM_FEATURE_PAC_DEFAULT & 2 -# define CFI_PAC_TOGGLE cfi_window_save +# define CFI_PAC_TOGGLE cfi_negate_ra_state # define CFI_PAC_KEY cfi_b_key_frame # define PAC_AND_BTI PACIBSP # define AUT AUTIBSP From patchwork Wed Sep 18 14:05:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Longo X-Patchwork-Id: 1986831 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=RyKqPZRh; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=RyKqPZRh; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X80pV0bylz1y2j for ; Thu, 19 Sep 2024 00:07:28 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C8D29385C6C6 for ; Wed, 18 Sep 2024 14:07:26 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on20608.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e1a::608]) by sourceware.org (Postfix) with ESMTPS id 90501385842D for ; Wed, 18 Sep 2024 14:06:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 90501385842D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 90501385842D Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f400:7e1a::608 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1726668418; cv=pass; b=sw8T7cvx81Bea0UCnzy0XX+I3iDo+27KL3B7kZXQFf9+V8He7Cp2ritdv4mb5GgKWIsm8rlz5A0c5k7ywIT5hlzoeQ7Q2grehk9OOjBRaKGRrF3TTwK0amH9QVo8JHIm1SIlB4Gba0fM0ordqMsDTqkhbuQ4RMEm3S9JNlkaUq8= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1726668418; c=relaxed/simple; bh=HNz+yMtAeKq65fG/vAPmLxTFyCQk9g5ipiNC7laFnno=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=qTDbvzZgI4x3zGKQgJlFsmG8CC39sAhUqFCPpds0FrV/pQ+nGgc+cObfyhHFOEkbbWRJMF+QZ4d03LKSG40YSDV4evRmfCCrECSF79CSDBZSJVf5RD17Mw+YqJXH4AQPqBm5cdK811c0Y/XiIz484p/0gQyyvGnoHm0k3lHQjm4= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=rMAQLKvErVt4rqqmqKSHztWWIC3M2VB4PLKrhMSEWHfBBjL5+YmjO/cMhmhfBYrfk74MzQOCPT+pNSh/ya77DDbwJQYfqspar8SLuhBltq200ihHAN3zWMJO3w1f0/hBeUqbx1mMBcq901DW4DO3jCGRq6t4som+VGXdSpZNg9YdFBb5l66Y3lhGqgN0CfO4Deb5VdcRjlxl8WrXTtVc19K9bcliWWHRQRo8G9U4NZr7trTcird4bb8lqcAu/khLa20adiEJPRcU+GiA8fAO7qDX4stPr/ST0giNAkne07yeajBDxVAg9J6atQ1KpIb3ZaGpvaWjiGdpxnZD5lFvYw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=SlStQSWRJQlg0GDl5FdPDqjCDhUrQS3IjUlxoI3E2FQ=; b=e9XXH9esf/9OpJXuTu+RV2yVbIAw0zLOnI0ATdkpC9Eds6KDg4YOOw8+ixtgxiq6GTxaaCrklD49Hpk/2JyKwWpnWWz3p6vLQiNIv0/E5R5XTSK/Ib8SEC+KTCxgEUmV8nN3PL0swdGZZMFagE+STL9+OIargG9tu3ZF20xZzQ03ELtvD2xFRg6F6pO3ikQZymLokKx1yiiNh6SQyIaY0DhBDp95Txw97rszD8v3ptqe6N2AaHchDLjDHv4CfVCOowLk6K+CziTuoH4Hr5aLhnhBjiQQITXmQgC9f/wIQT0TsSD2I7iQMZVnEgUpMpSoSvqytLKsdy4T4OaqlN450A== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SlStQSWRJQlg0GDl5FdPDqjCDhUrQS3IjUlxoI3E2FQ=; b=RyKqPZRh12jcEYGru4R4X/FqBL9jVqG17RfJO6+Wu25O9H9zJls364yxY9PXStxGTFkk9q/QK/rQOI9N7soKybdXQ9PYIGwx6zSiCuYjdk7gOwaORAghoKwEa80KLp6/cotoPf9/39Py7iVXa07mPwFqhFSoigLFi9pw4REWuwQ= Received: from DU7P189CA0028.EURP189.PROD.OUTLOOK.COM (2603:10a6:10:552::33) by AS2PR08MB9198.eurprd08.prod.outlook.com (2603:10a6:20b:579::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.14; Wed, 18 Sep 2024 14:06:53 +0000 Received: from DU6PEPF00009526.eurprd02.prod.outlook.com (2603:10a6:10:552:cafe::29) by DU7P189CA0028.outlook.office365.com (2603:10a6:10:552::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.25 via Frontend Transport; Wed, 18 Sep 2024 14:06:53 +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=arm.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 DU6PEPF00009526.mail.protection.outlook.com (10.167.8.7) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.7918.13 via Frontend Transport; Wed, 18 Sep 2024 14:06:52 +0000 Received: ("Tessian outbound 0881e36152ee:v457"); Wed, 18 Sep 2024 14:06:52 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 9d2ff856a34abe83 X-TessianGatewayMetadata: +NB8bxoPBUeDptgYQvBXaYP8jw6I0GCZkZFfm74fkl6UM9ZGi2pKdFYG3QsUZUwEICNgXER54v7SQpfXy+gwUBfiOal/p2U87Ss824XkuIrk+7gBVJpOOCk4loXVzsjnGi5IbRlHVQvcS9/ivthgXG+ed+MBxRBxjQM9kZJiyI0= X-CR-MTA-TID: 64aa7808 Received: from L4da5b89b2819.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 4B8D5121-3A71-4495-9001-F078F56B0733.1; Wed, 18 Sep 2024 14:06:45 +0000 Received: from EUR03-AM7-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id L4da5b89b2819.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 18 Sep 2024 14:06:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=p+oYj3zRalGYt7kQ8CYN8DmkEo+8/SiB85dW74hOIIqfeZqG4aYZZboJ65wG8Zg3W1QF3dDoHRNanRA03l64pXQVGicNIJa2D19+ozE6M1MVB3gciSXKEV1pGFFwg64RcmFoyws2r5aNuh63KLMG9I6/Yfb/cBQ4YbWyDKcUE7lPPMxiB/N/SfRpxRLfDgmxz+F9vGLJFd8qa53h69LqQe6ikOx/P3g9UL/B92lT3fZ85SQIJkVP//WcVy1mPGiYlPSwJkRseLBuB+HROJAhhUAVbv2t/OYd9hPzB8IgPeQY2Vy+58L6wKSUlNHNdn4ESVymLSwWfQG6/JQ96JdbWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=SlStQSWRJQlg0GDl5FdPDqjCDhUrQS3IjUlxoI3E2FQ=; b=Eut2QS7dkMxRewsqptM01tB58AWsXZcurTnQ42aYLMXgJ2NB+Ccd0dkPz+1zrS095yCgqg7hM+hv8EfI0OqvzEJI1hgEsGLezRBT546NnJZ+VIrjrd3+c6MfxbNKXvuAI8OAjbWbCg7mGRIRxFymVDMiqzBBhvWa8fzEEeJYpk1cU+DZJ/xj+3efY7G9zfOnsofQjDmSFtwzimiemLlY6xrM6yTfrX3ColBRmlCQNjGQQZ7rCAdGNSNvOAsazzHYzz+JRsbmsLpkzoD5q3ymvksELbaafPM8lO3nXWYoNzBfeef9Qiq6wkk5QM6Zw+lfzvePg7VBSxczYjuaXgCoRw== 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 (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SlStQSWRJQlg0GDl5FdPDqjCDhUrQS3IjUlxoI3E2FQ=; b=RyKqPZRh12jcEYGru4R4X/FqBL9jVqG17RfJO6+Wu25O9H9zJls364yxY9PXStxGTFkk9q/QK/rQOI9N7soKybdXQ9PYIGwx6zSiCuYjdk7gOwaORAghoKwEa80KLp6/cotoPf9/39Py7iVXa07mPwFqhFSoigLFi9pw4REWuwQ= Received: from AS9PR05CA0098.eurprd05.prod.outlook.com (2603:10a6:20b:498::22) by AM9PR08MB5985.eurprd08.prod.outlook.com (2603:10a6:20b:286::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.7; Wed, 18 Sep 2024 14:06:41 +0000 Received: from AMS0EPF000001B7.eurprd05.prod.outlook.com (2603:10a6:20b:498:cafe::a1) by AS9PR05CA0098.outlook.office365.com (2603:10a6:20b:498::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.25 via Frontend Transport; Wed, 18 Sep 2024 14:06:41 +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 AMS0EPF000001B7.mail.protection.outlook.com (10.167.16.171) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7918.13 via Frontend Transport; Wed, 18 Sep 2024 14:06:40 +0000 Received: from AZ-NEU-EX06.Arm.com (10.240.25.134) 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.39; Wed, 18 Sep 2024 14:06:10 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX06.Arm.com (10.240.25.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 18 Sep 2024 14:06:10 +0000 Received: from PW070M4K.cambridge.arm.com (10.57.76.20) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Wed, 18 Sep 2024 14:06:09 +0000 From: Matthieu Longo To: CC: Richard Earnshaw , Richard Sandiford , "David S . Miller" , "Eric Botcazou" , Jason Merrill , "Cary Coutant" , Jakub Jelinek , "Matthieu Longo" Subject: [PATCH v2 3/4] aarch64 testsuite: explain expectections for pr94515* tests Date: Wed, 18 Sep 2024 15:05:34 +0100 Message-ID: <20240918140535.1538392-4-matthieu.longo@arm.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240918140535.1538392-1-matthieu.longo@arm.com> References: <20240918140535.1538392-1-matthieu.longo@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AMS0EPF000001B7:EE_|AM9PR08MB5985:EE_|DU6PEPF00009526:EE_|AS2PR08MB9198:EE_ X-MS-Office365-Filtering-Correlation-Id: d0d04118-76a5-4abb-9629-08dcd7eb2584 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|36860700013|1800799024|376014|82310400026|41080700001; X-Microsoft-Antispam-Message-Info-Original: 3PhY3gq5kDpOxMmx9F+8qVG/4b6qfVgsz1jggbl+3hNmEFWFCInOjfTP8lZIyWpzR3nFHwWYbvIVkm7EFht+RA0+rKeiZ1BW/fJTD1L7iUmDrxsbuZVKLUgJR0EYbDE8llWVmL2ehykBbESKBX7iAb5fBuVgkLoqWRRrW77SeeAYAOCFCPAeLsAiwCxI51bAaPeBOeSlTI0OiqlD/ZqnznQDySfiw2mF+klIuFSEJpOH6dhq2II+WJZD2F1eHZc4FmBx7RaQgZT4uaYyDtXpFNe0QPwO+OFYJz+wyHCQ9fnZEWsf0d9mnyZHe/+qdXoNE1wzbdR+CQoyu4wegl06JWBpTbD+HsmqEtjs3bwE8JEhMhQ0NlbULRa9o7JSXbOSD6Yxxc5GzCAZPHmNrEdpfDkcm77yAXbJH6Jhgon0n/Y30E/cMER1zFj8dU8S8QvGSThmN3/5hvm5IetQ4HR5h0B4Ghv8xvEIW+vBGH2gFZ9Q/SDcLTxx/gvd2IFfyyAF3taG6zgJ8djC3BlVb7t7Snidsg8iU1VZGkbl5UhtaHXBY0Yf4dhNZhYruuvHw3xF0xSyqs/qQtAS7iKp4DexEP+1PomYhequ+rZFQ8HU32TxadgK9zUkghoMp4fBxaaKcrzV1WgiC7goQ3iLBDueMtYdVjFqXT7IOxF7blNJDtWBTuI+beBEcM1pnE9X2ObNziuXoITZZ7M+ayX475oc4arXzUB0K5T2HJ4ngGPceGvIEwsZwS1KJ1UpeaZFiHZqEooa9YzheObU1Guff2NDYNjWJgJ4Zw3qNqlHPAzu1RumP+wJzhUejxxDreMd3qkd3ovJwfjUTQIfaZm/65Xon/EWht3qism+Xd4hVs9cGdxZDEfnJK+6uTIdakVieqoJQI6uJ4N8icv5HUtMZPRDH2Doyew1uwOu1ObdHdkdaQT/oBKWmymhZD3LOw4wd/irL6bJ6jDA8E/iPUkKcW6FMtILx/fN3h0jKb7lmX7V4f7bcvNkxVA0Xz7LYwR/0lnbVeN8uzOdfWKGtoeVMrQP3o5Xzdu8/TtpHZ+vqbgI7TMT/S+qw3IPrKp4VA+3jlGD/7DmZ5UIHbaSSHoarpfugmEdoFn9ZuApV29c/BAxlmmguDL146viyE4TSg1AmpIU3iyx+8MynpzlVac2nXoIaPJzgfplI1t3HDKehSrBdIx3TFOL80B8ePEQc7GarrKhxvL0ck3/jU0v75ifAyeABxlP/MZ1LVXZftZlcMu0C9VZHrA6+XtTpyE5ghYSowN+j/WO+V1wV1V6JJy1fFQOFWPT11XhHTHbAsU4E4LW4mUeq6vzupVnuyqWuxReKOuP4hlYhH4YqQnPNz8q3LdbY8f7uRtUKdS79oU5qf1RWqzNHJZqirG/iyOL6rzMIRRU7AW+xMrEdMHPAgTmxY2P6WaEMNZlAptENgrasfKAImqcsHIJY0anavh8jRnsw/AW4F8KsxHvS8qrtpFM4ycaYg== 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:(13230040)(36860700013)(1800799024)(376014)(82310400026)(41080700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR08MB5985 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:20b:498::22]; domain=AS9PR05CA0098.eurprd05.prod.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: DU6PEPF00009526.eurprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: e3481cc5-d029-4200-9b95-08dcd7eb1e70 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|36860700013|35042699022|1800799024|376014; X-Microsoft-Antispam-Message-Info: N8Q2ERThlfWfU/PYg6cAbylEayin+6GDUcqzM1ys/MRHdowuziFvKuXTI/3G9kDssOim+PoGZRnyH03gun4813z8c5Q2cIWb54NjEc2DRfoJhDw42OKyTaEzQ78vkkerkyFiwHw5+7WqWV8JlxC+06LTuwfmsKk6qNeLy5OToAacdyiqeZT9Qz3lge0B7WasFtFho6kgSrCSf4rf42FOBzqvIV6aFTxH7rL1LBIqk3gRbr9uTfPzmEoPT6+xYnfP28/22wloQZtarmPWeQz+NsboNE1QEvrAC8x7GUMFQ82p682rJuqQ5AwOkeGi6aSg5u4rq3PwTkZy8+Rb1VrDmMJ1VvTmWlbB0szZodtj6r6vDIaHmhk7r5NNXfwiJIKyETzavt+j5Fa7otmYK9icl+vsNNyh8J0cvbT0ZNr8oznZg8VtXVwveblN8UIS8txSKcxo8WCPCc2CXTmjQjcnXAodnLjqavfZnZ+ZwY9W5qe9EAE1b1pKTufTML1ybvlHpSGzgqSw04QReZX9+vB8Zn76dw6u+5tvskJ3MFBx7K+cZdRllYGYxf8/2GBSzkpTwO6ZuTA1qeWvdZGbvzeha3IBpZmPo7Bby4FNaoq1cGr7eKiwd0zuRl5FiA9okTC+DSTp9BKmrrkHqCAq1JFJAQodmk5fPB4zo6qu6oI4g0JZxF11MmIjE7ez2q2/QsDgEXUZk7yK7AI33pnOfjniEVw1EGvbdTuAz0TcjmQSG5irdyzCyDV+ftJBIhroCMYKqNCxgr5ljPcMrrXHXIHVO4GRXuOYLRzNOYZARCA4LxYHaqNq1wvpTabrvVCqAm4pAklG77EJf4YWY2WpOKs1Fu8fJO079uR1qobd7Skb/q5iB3SO9aF0ZqAUbchxnX+a0p/35LWvdYAcuMCzWJDfTFIprQr/Pjlb0f/aiRzGVrExzfosP/FfNUCDzSBbijLsnEFW6kWhvzvzGjpc11YCjs+SURAQEkk7vl6JpkSW/AyD2Ul2MKPRzxm9AKNzYxYD5t6f4CxQZb9NU44rZExTs1pyTR2pCnI0WlSpmExS/1vUITFzfNqoTxXC3gHji89xpC1x3SZndkkd2QEcV9q5f6KbgCm6f0QhqId0YnJJ5g4uWpc5X2SWj1QVc6T6xqsk2j0wgMf5xvavGYz6t1MWZSmSXoi426y/zV1Kc6X5tSOheUf34yZPLTUZ/BT2xF1zNgqopQGNgoRAQVKOJONmhns9fv2TWOR0n57APY6J0jGRxIebse0+9X6AoNdI30ehFbvl8gjo+1ETYDRdYI77q8FFSjwJvTMepp0wq0dXZKbQ64bu6ArVydo8uHRSGsa+IoJOzbof7NgUXEhMsYkEGERnTgugcd7+YAWMrCUrtt4Uc0V4hJ5LgwX2v2s30R5pWlPeisCDk+W424PASDNvyDWbBQK9su4WsBClZcykyhFC5zhrEPHz45Son8mmMj+Y 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:(13230040)(82310400026)(36860700013)(35042699022)(1800799024)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2024 14:06:52.6187 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d0d04118-76a5-4abb-9629-08dcd7eb2584 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: DU6PEPF00009526.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB9198 X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org gcc/testsuite/ChangeLog: * g++.target/aarch64/pr94515-1.C: Improve test documentation. * g++.target/aarch64/pr94515-2.C: Same. --- gcc/testsuite/g++.target/aarch64/pr94515-1.C | 8 ++++ gcc/testsuite/g++.target/aarch64/pr94515-2.C | 39 +++++++++++++++++--- 2 files changed, 41 insertions(+), 6 deletions(-) diff --git a/gcc/testsuite/g++.target/aarch64/pr94515-1.C b/gcc/testsuite/g++.target/aarch64/pr94515-1.C index d5c114a83a8..359039e1753 100644 --- a/gcc/testsuite/g++.target/aarch64/pr94515-1.C +++ b/gcc/testsuite/g++.target/aarch64/pr94515-1.C @@ -15,12 +15,20 @@ void unwind (void) __attribute__((noinline, noipa, target("branch-protection=pac-ret"))) int test (int z) { + // paciasp -> cfi_negate_ra_state: RA_no_signing -> RA_signing_SP if (z) { asm volatile ("":::"x20","x21"); unwind (); + // autiasp -> cfi_negate_ra_state: RA_signing_SP -> RA_no_signing return 1; } else { + // 2nd cfi_negate_ra_state because the CFI directives are processed linearily. + // At this point, the unwinder would believe that the address is not signed + // due to the previous return. That's why the compiler has to emit second + // cfi_negate_ra_state to mean that the return address is still signed. + // cfi_negate_ra_state: RA_no_signing -> RA_signing_SP unwind (); + // autiasp -> cfi_negate_ra_state: RA_signing_SP -> RA_no_signing return 2; } } diff --git a/gcc/testsuite/g++.target/aarch64/pr94515-2.C b/gcc/testsuite/g++.target/aarch64/pr94515-2.C index f4a3333beed..bdb65411a08 100644 --- a/gcc/testsuite/g++.target/aarch64/pr94515-2.C +++ b/gcc/testsuite/g++.target/aarch64/pr94515-2.C @@ -6,6 +6,7 @@ volatile int zero = 0; int global = 0; +/* This is a leaf function, so no .cfi_negate_ra_state directive is expected. */ __attribute__((noinline)) int bar(void) { @@ -13,29 +14,55 @@ int bar(void) return 0; } +/* This function does not return normally, so the address is signed but no + * authentication code is emitted. It means that only one CFI directive is + * supposed to be emitted at signing time. */ __attribute__((noinline, noreturn)) void unwind (void) { throw 42; } +/* This function has several return instructions, and alternates different RA + * states. 4 .cfi_negate_ra_state and a .cfi_remember_state/.cfi_restore_state + * should be emitted. + * + * Expected layout: + * A: path to return 0 without assignment to global + * B: global=y + branch back into A + * C: return 2 + * D: unwind + * Which gives with return pointer authentication: + * A: sign -> authenticate [2 negate_ra_states + remember_state for B] + * B: signed [restore_state] + * C: unsigned [negate_ra_state] + * D: signed [negate_ra_state] + */ __attribute__((noinline, noipa)) int test(int x) { - if (x==1) return 2; /* This return path may not use the stack. */ + // This return path may not use the stack. This means that the return address + // won't be signed. + if (x==1) return 2; + + // All the return paths of the code below must have RA mangle state set, and + // the return address must be signed. int y = bar(); if (y > global) global=y; - if (y==3) unwind(); /* This return path must have RA mangle state set. */ - return 0; + if (y==3) unwind(); // authentication of the return address is not required. + return 0; // authentication of the return address is required. } +/* This function requires only 2 .cfi_negate_ra_state. */ int main () { + // paciasp -> cfi_negate_ra_state: RA_no_signing -> RA_signing_SP try { test (zero); - __builtin_abort (); + __builtin_abort (); // authentication of the return address is not required. } catch (...) { + // autiasp -> cfi_negate_ra_state: RA_signing_SP -> RA_no_signing return 0; } - __builtin_abort (); -} + __builtin_abort (); // authentication of the return address is not required. +} \ No newline at end of file From patchwork Wed Sep 18 14:05:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Longo X-Patchwork-Id: 1986833 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=k7HG/J8S; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=k7HG/J8S; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X80qh3xXyz1y2j for ; Thu, 19 Sep 2024 00:08:32 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 410B63858432 for ; Wed, 18 Sep 2024 14:08:30 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on20618.outbound.protection.outlook.com [IPv6:2a01:111:f403:2606::618]) by sourceware.org (Postfix) with ESMTPS id 4F23F385828B for ; Wed, 18 Sep 2024 14:07:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4F23F385828B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4F23F385828B Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2606::618 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1726668423; cv=pass; b=WZZZlJMNDr+4GC9ZAaHTIk7JcQG4NZqFAC8N9B1pcgEHmSz4mQ8Q/iiPXjICMuPusm22DX4HrgX161WtYtT6pIi5hYOKrCShPUW6ovMb16LimeU0HJXKeVSe6ext6ZBUso+fYWloo3pnUHd6Q5cIvNlwZh4//9zJqtpZAgY0XLU= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1726668423; c=relaxed/simple; bh=XKcym5CnMSSNmdw1eHQcDE7J9kvucQbWVBHGTdgwH0I=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=VnajmtqteDt3zoglorAbdWjFsWon4sSV4DizBc7wrwMFJ17GoXVDdT6KQx4/2obCPVIP6Cn7F+rLELmkq3ZAkhipwehh+okx7E1bkpoURh77Skmar7plDHrKCaSdb2brQK6fRRq13apnpY+h4nYyEakOE9291uC7Ny4ro7xleCE= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=oWQOpvPiHk11gz+/FAxWN9aufUPufTLo+UkILzm9cedzRybJBhz9gWIis7hQ3xc3Vfm+H45qKPmzMD4QG9XqByhz1M4ya31/5w52knYS8eNmn7IuXkXz/x+WLPvrFvCljTf9KV6m+plgLRCiX1o9Yfunb4MOeUVVFeqPU/6Bd1DaKwokKgAf3SToizGXjeas0SQ5+mISO+M+F9F6kReCtZY1llWcI4sLqkqTWqAxEJ+tb1UVuYHJS9P3B0WIxgJqj48IX/OLlt8eZGvEKhsehmf76VTK6RFH6uQdopQu7NoMUmIKbiyvMuf6xx1n0IDTNqYxAjnb/Bmneeqb35KZGg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=nY/03Lx8n9+KcxnqI89l3z8VLYumu2S0KdSlD+52yJQ=; b=Urbj75+E6Lj1etEAb3uy7x0JPKHTe84sF/r4cud8JaJIrWsNMyJTkoutxoeWWxyJuwAX8oPjNx3x6t+3y9o45uuTwY6TNZii03bBUnqPODuJa+VeGpSARpISuWiEQgCKhsjXwA9NRDmO+IUzinbzvtPq8EQ0wWqKq4UjGYmcOXHf1GM3q6KGK+KTcEsfkKQT6uSlB97WVdztT7gvBD4WbmCTEYqMjTW5SEc/eFg01VzMqxrOtRTM+xO1fFGZWdO8sM5+bs+pPietF1WSFEfFHAxcC4IGD/BnoEif52a8r7/saVh9WH++sl2oN1esVVnbFNtuPaLunXnz2jj4rzM9IA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nY/03Lx8n9+KcxnqI89l3z8VLYumu2S0KdSlD+52yJQ=; b=k7HG/J8SQIW9raZ/Q70RhR398Q+iuklYUWpFO2r95ENI/C2ifGyvJqrvegUF6PVPvB5sq72p6wpr+kDgCIz+baMOVeO/TttPGqrN8CV8fDIwFKjyUOKAkYUELpEzbE40ZrtmroUav1ZeGRdGwNlm1CyFM4ymEucn6BHkEbDNOis= Received: from DU7P189CA0005.EURP189.PROD.OUTLOOK.COM (2603:10a6:10:552::8) by PA4PR08MB6304.eurprd08.prod.outlook.com (2603:10a6:102:e1::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.16; Wed, 18 Sep 2024 14:06:56 +0000 Received: from DU6PEPF00009526.eurprd02.prod.outlook.com (2603:10a6:10:552:cafe::a9) by DU7P189CA0005.outlook.office365.com (2603:10a6:10:552::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.30 via Frontend Transport; Wed, 18 Sep 2024 14:06:56 +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=arm.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 DU6PEPF00009526.mail.protection.outlook.com (10.167.8.7) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.7918.13 via Frontend Transport; Wed, 18 Sep 2024 14:06:56 +0000 Received: ("Tessian outbound 664db2787079:v457"); Wed, 18 Sep 2024 14:06:55 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: e2065cad94f18dec X-TessianGatewayMetadata: 2K4+vE8Ly/f0NbgPOZAMzberORkcwh3a227huU1xo7OM6c4Ke0nbu8+7WbA7aywcSijkNml1OwZwWuFOr5dMxXvlLHuETjxB5gZVqBudETIUAJ6Y3Z/3vaFPh4xIPethTruVh4PpbLCYFSEzpd6iYVfHzjNPGO+DsQ0yU+pUDZs= X-CR-MTA-TID: 64aa7808 Received: from Ld17eb74c892c.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 1D551BED-4B1E-4420-922B-01725D0AA7D2.1; Wed, 18 Sep 2024 14:06:49 +0000 Received: from EUR03-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id Ld17eb74c892c.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 18 Sep 2024 14:06:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=SgfTlo/5wCTVT5+J6kY/8Si4cqH6ogZNQQ+Cl6ZDe2UgFRhcxHNZimfRx3sgypo+9iHrcgXvOZomYjkESj0gLI5LQVwYcuK3BlWtbsVZergE84hJevz6FI/bPw4M37fZZoiC2fOybCSh6iYfhRxRlwRNS4BMGZdFTd3MTUXnKpFHZ8WmlwY8UaZMx8V4sqkjgAiUepzQ4fTdq5DlKvmQGp9/byODqS6CYgoD/uCYw6TDCY8sqHpK64rtwt6jrFLkj97dJzolBhMkcfjDa7JYh8I2QilDdi8WaRj73kxAXj7lQyjp/wzewUTEk6z89R1K1svPlxTgcLvzrtBz0Gltvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=nY/03Lx8n9+KcxnqI89l3z8VLYumu2S0KdSlD+52yJQ=; b=RAJ2NVqKAGTmYj6NadTBN2NrC5g2caEvOmcsaEteWtA0l3QRQ+xDZcQO8zQ79euGsQW82p+8hYLAx7ZUbGdz2m2LYKsxVK00OFfu53Gqi5g9AXUVE2nkKBnkVfhoQoqIIhkP4sKIkq4Q3MVwKByNtA45xSKJ7MbZaTIUj5ld+OF5wuJGYPOq7H+FDn58Em63iJJN2Ri39y167YXv6gXeiPy0mpMtuYTKOmzYtG7MPWGT40aTD6DXU0TD+PAEMYlb0ceJaW6cUNeL99vomYIPY3M5GDYep37rKn16ioY80L8t3ucP2nQLUGNllq1R51iIW2pLeUNHHe1MCXMAaNDZqw== 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 (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nY/03Lx8n9+KcxnqI89l3z8VLYumu2S0KdSlD+52yJQ=; b=k7HG/J8SQIW9raZ/Q70RhR398Q+iuklYUWpFO2r95ENI/C2ifGyvJqrvegUF6PVPvB5sq72p6wpr+kDgCIz+baMOVeO/TttPGqrN8CV8fDIwFKjyUOKAkYUELpEzbE40ZrtmroUav1ZeGRdGwNlm1CyFM4ymEucn6BHkEbDNOis= Received: from AS9PR05CA0117.eurprd05.prod.outlook.com (2603:10a6:20b:498::33) by GV1PR08MB8033.eurprd08.prod.outlook.com (2603:10a6:150:9a::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.16; Wed, 18 Sep 2024 14:06:45 +0000 Received: from AMS0EPF000001B7.eurprd05.prod.outlook.com (2603:10a6:20b:498:cafe::f0) by AS9PR05CA0117.outlook.office365.com (2603:10a6:20b:498::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.25 via Frontend Transport; Wed, 18 Sep 2024 14:06:45 +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 AMS0EPF000001B7.mail.protection.outlook.com (10.167.16.171) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7918.13 via Frontend Transport; Wed, 18 Sep 2024 14:06:45 +0000 Received: from AZ-NEU-EX05.Arm.com (10.240.25.133) 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.39; Wed, 18 Sep 2024 14:06:21 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX05.Arm.com (10.240.25.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 18 Sep 2024 14:06:20 +0000 Received: from PW070M4K.cambridge.arm.com (10.57.76.20) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Wed, 18 Sep 2024 14:06:20 +0000 From: Matthieu Longo To: CC: Richard Earnshaw , Richard Sandiford , "David S . Miller" , "Eric Botcazou" , Jason Merrill , "Cary Coutant" , Jakub Jelinek , "Matthieu Longo" Subject: [PATCH v2 4/4] dwarf2: store the RA state in CFI row Date: Wed, 18 Sep 2024 15:05:35 +0100 Message-ID: <20240918140535.1538392-5-matthieu.longo@arm.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240918140535.1538392-1-matthieu.longo@arm.com> References: <20240918140535.1538392-1-matthieu.longo@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AMS0EPF000001B7:EE_|GV1PR08MB8033:EE_|DU6PEPF00009526:EE_|PA4PR08MB6304:EE_ X-MS-Office365-Filtering-Correlation-Id: c0e32335-4a5a-43b6-ba7e-08dcd7eb278e x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|1800799024|376014|36860700013|82310400026|41080700001; X-Microsoft-Antispam-Message-Info-Original: eQM029+GgDPlXUpDPa3uVO2ybTiKPBjfNZj/59WMtcuGhs1xh9yNHLJmR3p7+FHLZaYMcOBZSpc4IsDUyWiukG81EWzGf4piM3TakhuM2Ls/ugWR5mqRkG1dEhPlZf01mODuTXV3m0z2T8lBPEr/EKaGVUcOuR7HYq0xwfXeLK2OCeU8D0HqZ9/mR5QrJa6HK+xpSIbI/sHAHTvA5BOI8/8WUeg5NtJQlYD1odsuYKFVDMP2Q6TuWna6rD8c6t0yx/fkDzuWAzZfIkdw5PMuIuaiizjxmP9679K2bBq7KJyxW1xAkt53msfXNgPri7ANda1s2qSlJizaDmF1n2SqTG+Z66XId6TFbhASJYsG+0S5l5EXaOFfWCi0TLaSn1Kz3tayLoTYQundnA8Bu1Y8T5KTsBy69DhAaqZrGVHHmPsAQdmnAX94Y2GUwMPUrJ9yPcUpRW76TGcm5uZiL/pdt/JFcP60V4+ItRFA5uNi7jHuhV1oQv6806mBnkIuh9VWOBLdScvEmOddDnyi5Vl3NFwKxYNnGFtXFz5Xg8Bhtn8bf4IErVQJK1GSlf9tbBEgPvGY7eDU2L8X6SRyoOKSP+FnFunQX9MDAwof0X2YfsAh5388qlFZjvN12g4Q+WQlnEw5QT7X4exjcQNm9PK8goGqgMGsrwv3vwsZKvgR6UlMzroRYd0d6QLhhQdBqaFdw8DDBSqMnUhDsuJlAjgTFj7Sjz3HakI1YmiLpt3uFEt9UuLYXs4TMB3JVqJucj9UL84UTuSYNLtTeNwOh+7duH+g//IuM+75ag9WMxFABXCaXpag3SWMckXRWDy5AAGbByCMGfxX66oV6t+z+2b45LdQ0qxh4WmsGr2iEzBsB9Vh3ZRrH4+/RGPBD3BP8EWYLFbUWxyE/054Wyd1X4Vy2rlT0Kz+inJexbaQOJsesYloURA018M126EvLgQEJVVWtvGYv/5lBW0bvt5OIfALQgk7lX1AU4i+dfGxMhtkBtnToPO/qUAIO99AETy8emcG+u1LvxIDFsA7Rg13OszwP6r9R9qsT7DXo/o9rnmlnU1O2xCE7lAaAmIXcJM82h4pyMZ015JOibJHQDRgQGIIXijuIY7NWHCWSxzF2tjafvs5tFA36eNSroJD1sbZxdAbFXsjRuLBaDj4U6eBi5HOOdgyvPxGGzQdztXScha0d7cE2k/v6BceXYBeII2UZ4HYerkf4CzQo3YzktyalC3UPvO562jaDk0WFFzeTg+JRbiabOUIfv8gKnUVq6VK0JIX/pO/engRTKb5Jy1F5McduA1tKyfrYUlTS2P/lkbstbQ1a18Qa8od7CcLNCAiUqD5uhLU4BD2toCkVaXrHTNvFtavXbnF3OO28XbHRDQTRIw9JC3G0B3iod0QcKqiTYBae1v3oERz5rijXSZ6fV6Mh+hG5Vp2G6zIvVu9yKtbOue59c41rq2wtE8X5FHqKDvbIK92y4+Dk4IG495siZnd3Q== 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:(13230040)(1800799024)(376014)(36860700013)(82310400026)(41080700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR08MB8033 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:20b:498::33]; domain=AS9PR05CA0117.eurprd05.prod.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: DU6PEPF00009526.eurprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: dafbf5f1-f71d-4fc2-5512-08dcd7eb2132 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|1800799024|35042699022|82310400026|376014; X-Microsoft-Antispam-Message-Info: z0qfK/uezUEEZBEtxiE1+QY7IjObUs3XZDwwPkrg0c21omkS475acXRDvXK4P7pYmTg/sT3R6a9ldgXjpZj0lutdZ+K3aqErdeb4zH0cAcoRh1AHEeBoQCFMBVGdq9LlmtkoWdbcksRc4v3h1aLbiaN2UJtaUVGhJpgGXmuiGs2AIfq+oqN+uQ47mDo6K8HZRXedxygBz1/rW4JwYl07AuSfyDTa8j4bCI5+kKNvU160sxoQVXFZAd8+nFf8y5/YMxKQ57oquffr+vBb7OEDb6UMwamYq8N0Aun80fsFYv7aZFAZm3ppgmDkZzWFLUjf4+gtTVKoA+6f8gjUdZRjdZvZ4xOUTY7IHEDcINrkmuERgq59fxwfBNlx2UJrHvHlwJmhek6uNOIMJ7rLFArMRAodKlNmL45vp/LmwH9+vqjnaWjV4K+h2OueWylhz3fmzbbsd2zNJ+7aDWiZ5ZXcn4AYw6sHhNaafuvGUvsP4oN0AQgc5Gh5sbZsPZxr7d6z9Ojq3IR+9IsV8aK+Giw8lLLMAPo+S8I30CetcImdGHI5YAtjcsWqE5YJHBCJVyq+cX8UUbSwcrYBgW3HEVI7WR6jSW0CoS80kd6K0I28ZiNf+UPnC7k1w3dANGJmHwwM3LmZAgeeiBvxRhfUachD6YqMGd97ekfR9lDBQhfAUe0/+YrSKa74WcRoIwyj0wGqF4/5GockR4iEx4+J4mLlwWnXPdnT3mjX01Ed8J4OFK0QY7l9cpp++2zCjCfgBLj2nlmdh2Sr+v/LTbm4iLSMa2yzWjalclOoPcvDsn8zoEwb/Ay4PYDNl0qeammqIjGMGh2nBpUtajm0DprjatJgm94n/6TKbuF6zgr9r7Pk9cr4bxqiTrJPUBcMlm3gi1Hl9wDALMYPP+ve6VRPmU101pfaTMquwz+ga8x/jAjKSVn0Ad4fXSREMgql5sQFm0PrypKvAkf3a+oJqLkeVYc804I4xjP080acmYxw1wylDjP/SpZ7iYqmvqX7fP51jYCQBd0rGhZJoVJ992iuj+EuKB1pL8VUteFEbGw6Zn6XokH3UQ49exAap1WgzRddUpB0m02XMmMNISU2hq+R7Fvfk0orA1+taOINbpMlGTr0Zy0UYVur2J/Q4iJ41gAJsu743OG5FsO/IAZVpkZrSBkW+iPZq7bcS2Pd+u50oll61ZcRKwDPCPPFEnRF0wWd+cSYP+H2hpgChy+ERIUdiVKDOURJfFWupJKyfjlOUM8gRC59KcIsJoICkIXRKW9kTmZHlmAtUnX6C52skail5aj/erFp77+JAvz+Jj7I1IOUITg9kC3UwqYME9xtdPF5gQO1cNuhZjKMbCslcZyt3kHqjhOUytk9H8Q+ktlgIWQDy999dyJ7BMihe4i9LmFTSF/bsJNEhipipQi96TwT2ixKHyAfHN7Hno0ndsiFaCD7mf59QzNZfQehyCJ8IGIZ1cvb 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:(13230040)(36860700013)(1800799024)(35042699022)(82310400026)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2024 14:06:56.0250 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c0e32335-4a5a-43b6-ba7e-08dcd7eb278e 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: DU6PEPF00009526.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB6304 X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, SPF_HELO_PASS, 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.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org On AArch64, the RA state informs the unwinder whether the return address is mangled and how, or not. This information is encoded in a boolean in the CFI row. This binary approach prevents from expressing more complex configuration, as it is the case with PAuth_LR introduced in Armv9.5-A. This patch addresses this limitation by replacing the boolean by an enum. gcc/ChangeLog: * dwarf2cfi.cc (struct dw_cfi_row): Declare a new enum type to replace ra_mangled. (cfi_row_equal_p): Use ra_state instead of ra_mangled. (dwarf2out_frame_debug_cfa_negate_ra_state): Same. (change_cfi_row): Same. --- gcc/dwarf2cfi.cc | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/gcc/dwarf2cfi.cc b/gcc/dwarf2cfi.cc index f8d19d52429..1b94185a496 100644 --- a/gcc/dwarf2cfi.cc +++ b/gcc/dwarf2cfi.cc @@ -57,6 +57,15 @@ along with GCC; see the file COPYING3. If not see #define DEFAULT_INCOMING_FRAME_SP_OFFSET INCOMING_FRAME_SP_OFFSET #endif + +/* Signing method used for return address authentication. + (AArch64 extension) */ +typedef enum +{ + ra_no_signing = 0x0, + ra_signing_sp = 0x1, +} ra_signing_method_t; + /* A collected description of an entire row of the abstract CFI table. */ struct GTY(()) dw_cfi_row { @@ -74,8 +83,8 @@ struct GTY(()) dw_cfi_row bool window_save; /* AArch64 extension for DW_CFA_AARCH64_negate_ra_state. - True if the return address is in a mangled state. */ - bool ra_mangled; + Enum which stores the return address state. */ + ra_signing_method_t ra_state; }; /* The caller's ORIG_REG is saved in SAVED_IN_REG. */ @@ -857,7 +866,7 @@ cfi_row_equal_p (dw_cfi_row *a, dw_cfi_row *b) if (a->window_save != b->window_save) return false; - if (a->ra_mangled != b->ra_mangled) + if (a->ra_state != b->ra_state) return false; return true; @@ -1554,8 +1563,11 @@ dwarf2out_frame_debug_cfa_negate_ra_state (void) { dw_cfi_ref cfi = new_cfi (); cfi->dw_cfi_opc = DW_CFA_AARCH64_negate_ra_state; + cur_row->ra_state + = (cur_row->ra_state == ra_no_signing + ? ra_signing_sp + : ra_no_signing); add_cfi (cfi); - cur_row->ra_mangled = !cur_row->ra_mangled; } /* Record call frame debugging information for an expression EXPR, @@ -2412,12 +2424,12 @@ change_cfi_row (dw_cfi_row *old_row, dw_cfi_row *new_row) { dw_cfi_ref cfi = new_cfi (); - gcc_assert (!old_row->ra_mangled && !new_row->ra_mangled); + gcc_assert (!old_row->ra_state && !new_row->ra_state); cfi->dw_cfi_opc = DW_CFA_GNU_window_save; add_cfi (cfi); } - if (old_row->ra_mangled != new_row->ra_mangled) + if (old_row->ra_state != new_row->ra_state) { dw_cfi_ref cfi = new_cfi ();