From patchwork Wed Sep 18 13:55:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Longo X-Patchwork-Id: 1986820 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=UmmvhBbp; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=UmmvhBbp; 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 4X80bg0dMkz1y2j for ; Wed, 18 Sep 2024 23:58:06 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C791D3858427 for ; Wed, 18 Sep 2024 13:58:04 +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-am0eur02on2061c.outbound.protection.outlook.com [IPv6:2a01:111:f403:2606::61c]) by sourceware.org (Postfix) with ESMTPS id EFA673858402 for ; Wed, 18 Sep 2024 13:56:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EFA673858402 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 EFA673858402 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2606::61c ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1726667789; cv=pass; b=j9AS3fdEokBc/rXTdbF4RGAMaorzDfmnB+Z+TUuycJvl6CxO/Xp5O1ZiY5StyXypwW2J58KEzW5aEq/Gc6750fnLVqhrUTm8HlSZYvtLoonuiPya6MGarPPnglgrJZFuqM+6q89MDj94aQLA80fnK7tMRjsNjCcYBQz8O7mp1T0= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1726667789; c=relaxed/simple; bh=YM+RW8ztfeeGC4eICSoxXiscHz978n4fX4C4dWUULjk=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=VSjs6cSB9akeRnKADTW0BxkX3HLHK8ng3o0hQD4cjm1u269CWK5VcrHEYoo8K5g1ytrGtSnHL/3BT8wcKQhSxoQR7JlFgbzt+SiXeUKIsLMxFcBJkqociSzrdaKjA0DqSamYR7w+mKuHz5FZ2lkTwEbTjwREFYbSrVsMI2N/43A= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=XJjjW6sNu1mlDIvAFAq9CsuQSEoftcd7fUt9XP3fgl24gnnHBwaTtw6DEy5afunCtc2fKlGNq/hg549JyXefF92puG2Is/iPNunGhK3CULlTb++2SDnCDx2ImVkus0lGGwG/OuaJzeSeSLFEbRIIQoKQA4RzF0sHNoQNPrOFvBD2jhRnD47TFFFBucpxtLp6aBfbUqSxgGS8US7Sv9YY25fNU/ENU4tyLRvXPVOxsdXvPXfclMp4qHZRfGSsGU63aPSs2qE6KAALPtvWf41FNb6g+JDCOtKzUAfXg1ppMlwjNVfyVmhh1+Sd0uazzP2ZKkZmNrLdOQCaPJQkDd5nqg== 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=JxAqCZMes5jUEvE3qp6qS74eNWi51bpwMVFu/wFrnUE=; b=dEIipCHvuLeVxrH8RjUXX2Dhj+/kzfd3JVA4llRZ4Iu9d6tqhGUvMYABxkGqRxahfSvOCtDZz1AVsdZl/EibfiAVmXqZGkOe8SpbZmHIIsTuB8TwR6uPy7t84yuxSfskw3OtHaPEae0TNp7Zsb3oNr0UmcglSe2zF+TFTXsUCzgrS7F2MhjVs8w9LJDELIWNKEQfy3AravMTc5RZDqicTq9ECMVraAiCJaob2DUmOWBkGDFv+p80ThDfJ1ecKcBQaEtwksw7iNwOTfBGje/As4dxbMv4PS2dziOXbKNEHM1U5KQ97Y3ePe5tAkU5XZwgp1xOotRxiEUblKAD+aSRSA== 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=JxAqCZMes5jUEvE3qp6qS74eNWi51bpwMVFu/wFrnUE=; b=UmmvhBbp9Q/yd6uQV9xeaYihmAH+cMI5j5Og3taYoKIyBW12LKtXJ77QbdcA9Y2Tx3vl9Z1TfbsJ/wQ8K9T2zi+ydK+knNj8DLg1IWow329B31UHjTRS+fvkKyXy5vV9MxC4RKxQPHr+gYFrpvusLnZ32WDFfal8hmBJzVCuFMY= Received: from AM6P192CA0027.EURP192.PROD.OUTLOOK.COM (2603:10a6:209:83::40) by VI0PR08MB10895.eurprd08.prod.outlook.com (2603:10a6:800:257::20) 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 13:56:20 +0000 Received: from AM4PEPF00027A63.eurprd04.prod.outlook.com (2603:10a6:209:83:cafe::d0) by AM6P192CA0027.outlook.office365.com (2603:10a6:209:83::40) 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 13:56:20 +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 AM4PEPF00027A63.mail.protection.outlook.com (10.167.16.73) 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 13:56:20 +0000 Received: ("Tessian outbound 4d93591989ea:v457"); Wed, 18 Sep 2024 13:56:20 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 1244f3dcf3b231db X-TessianGatewayMetadata: buuPx92iSEhjbyz5dqhQ3A7YXsbsDBLaz6BwPVSWL6Ih0TnwcLrIBrTEXhBeMYR8ivQzWeOhUOy1T0r3ttZdg2EzOx7FXepVGvArXDAlUAOM1+wIh/KEwpKCqwnIDLfHmt5TyZGrkbxbesTAJDVqmSDnX/1KydyJ5d6u9DYQ3+w= X-CR-MTA-TID: 64aa7808 Received: from Lb7c18beb6ced.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 9A2C4941-AE41-46F1-B6CE-D3EDE8057E5C.1; Wed, 18 Sep 2024 13:56:13 +0000 Received: from EUR03-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id Lb7c18beb6ced.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 18 Sep 2024 13:56:13 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=JUpCH4nWve8R+8OYFCVRuLGyO/pQ0vZYfZwhdyDkhDN5JNMhi+WzkPtPsLAkVDXXp2hKG4ArnDiySqnYwU3HPmAEHi8yJQBxKIVkYoUZtUHOqQSmfv9fzqV6OyHe5OM73KQJhbd8OIbpZMD87mWRYzc8a9wbN6LOLWRQ+DnaYRDawt5NgAHG4WaZ1CuxkO33a4HL5o6f5wJZd4X56CB814A+DdEwdteZJvOIZxTL/FyWfbXLbwpRMJFB1T8hGkPsKcQQob9kl74ME5EsHI5FXVKgSQOGLfVgW4LCeHxiElpVxj3tYuVsZ1kyHIyrP6cNqZyZUOOGzFJxZfQFRwov7A== 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=JxAqCZMes5jUEvE3qp6qS74eNWi51bpwMVFu/wFrnUE=; b=Glx3yLq0UAEOEA6EQRCQo2oOIiSuiw4Jx3uoSe91xW9FH+EJPtatGFy2vjPPSxv4zIY6HaiufSEoZt+gibQxTFgmddEQO5RnqZ3W64+T8TVqW7GdU0tljQ7EVhk55Oe6hN7kM4O8kB3G2JM36wqos+hagFZZoUSflsTIjsg+tgo6Q8neRdrGmuzZMJFRE/UCw8p3p1DDDHISAIlBB2Ng2GydxWkdRMTpKjez3jvoIbsBotqDFpZiKD+RsB2275nqallgGlQq5F7mJivQQ5CE8x2dcqCqCzWzGg3FqaB4ObDPUBa9OywNXt4kSKhqnEfyVCHJ6WhgRYrKJSpHx9fI8g== 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=JxAqCZMes5jUEvE3qp6qS74eNWi51bpwMVFu/wFrnUE=; b=UmmvhBbp9Q/yd6uQV9xeaYihmAH+cMI5j5Og3taYoKIyBW12LKtXJ77QbdcA9Y2Tx3vl9Z1TfbsJ/wQ8K9T2zi+ydK+knNj8DLg1IWow329B31UHjTRS+fvkKyXy5vV9MxC4RKxQPHr+gYFrpvusLnZ32WDFfal8hmBJzVCuFMY= Received: from DB8PR09CA0026.eurprd09.prod.outlook.com (2603:10a6:10:a0::39) by DU0PR08MB7567.eurprd08.prod.outlook.com (2603:10a6:10:317::6) 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 13:56:09 +0000 Received: from DB3PEPF00008859.eurprd02.prod.outlook.com (2603:10a6:10:a0:cafe::d9) by DB8PR09CA0026.outlook.office365.com (2603:10a6:10:a0::39) 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 13:56:09 +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 DB3PEPF00008859.mail.protection.outlook.com (10.167.242.4) 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 13:56:09 +0000 Received: from AZ-NEU-EX05.Arm.com (10.240.25.133) by AZ-NEU-EX03.Arm.com (10.251.24.31) 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 13:56:08 +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 13:56:05 +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 13:56:04 +0000 From: Matthieu Longo To: CC: Richard Earnshaw , Szabolcs Nagy , Jakub Jelinek , Richard Sandiford , Ian Lance Taylor , Matthieu Longo Subject: [PATCH v2 2/4] aarch64: skip copy of RA state register into target context Date: Wed, 18 Sep 2024 14:55:04 +0100 Message-ID: <20240918135506.1534663-3-matthieu.longo@arm.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240918135506.1534663-1-matthieu.longo@arm.com> References: <20240918135506.1534663-1-matthieu.longo@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DB3PEPF00008859:EE_|DU0PR08MB7567:EE_|AM4PEPF00027A63:EE_|VI0PR08MB10895:EE_ X-MS-Office365-Filtering-Correlation-Id: 95b684e3-bcb4-4ba5-f26d-08dcd7e9acb9 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|82310400026|1800799024|376014|36860700013; X-Microsoft-Antispam-Message-Info-Original: aGGH4Fxb2XQmhaAz+4mF0+ba26iCnpBpmdjd8tUUCLGz+ylexxszPQbDLy+Yj1YRnvoZUPKkEoiSDJGSbsNJrcZ3z0KuTw1pP2U2v+chd2nW5IZZ+7mbP4f4aERXETKZilmEipaVBVn2bDgiUomy5PrwW8KuL1LNerv3ys4LPIVgoBg1TUeYyZuXSBeGMqSs26zC4Fn6wdBpTE/pXe3BjTrbicxSoaF1M/7YmGpwXg2Zoh/532OxVq4C4emlqGk4LaOQ59nH0/FOzXQoSaPic+LjPMW6bZB8PaDegZy2wIkegpQwwDwb+g0MPlq1JhQO07lEJ4NRCbjt6YeNxqNyqK+cQ4J0BJlJsAAb86Cp1qwdcjtjTfTy0xQRRG6EIyUvObES8o9N9wHPjLvp3KRb05C1jNBFBweZGhoni0enn/y/vd+l+uDupM9vm1J5UU8FaERONM4Xj2D6Y7zGZ/y5HEoTXIwJQkxYpcz3sk/tLyQXHb6Gi91+VSatZbF5d4q7Xjoq2M1lLEYakMkQRvwW0qnREmfmcyAHefpLo4w4OCurMUZn6nkipLxuFspvNVZKupCnEhLQG4eaDicEJdP6q0zQ9taUYGH8NVOFj5SP7HaKfqu6niO+wqzkXY5QHeAtYuUDprg5nhsi49lQ23GpNPOth0LvBrjZmEYblf7iwyO7wt0PYbOmf4/kb1p8maSXbwno1nfukJeZcDDWg2RvOspi57yH44noh1nWsADcTtHRdkdAmHOz64iQHw55ZPW9RvL2OUddDMJVFxUMv2Fnm9+lUyScE4410Gn/s+RmEwhpXpBWiH094DmaM1HiQT18Ad7IR1uBtWrWfrMU2Io5glQ6lk01fVjXQJa89cvrg7tUeTNmHwACaK1Y/fcvfFclNc1PvqHU8E/ds7BEta02t+jHZIUAVqMgLxdztMgR9cBqAUc7a/oCDwrspg3mGKM/X0jl8otTI1DuUBW6RYE52sNIN5W4Nudy56nnrFK+9jkrSiVWykGPHWScM57m2hN3YfqivOcXt12+jREui/sl1WpN6CKdNyS20GwwgEe2ctC3FLR6CV7L3Zjw7D11nMb3UCci/Un9VtiJa6i/CdDBSDrgnuS3DVW2+4PPkITsU8yf6vFsLaH70QOGX3h7amk/tEdeT0fBXpo2Fx1F1xuXl/ADIB7c/YxXodEhPZjS5bwcz8IZDOmz9vVW9JLU4EeGqQta+2mmgOWcoUUy+l831pgSmTz9bTTgDpXtAroLnAHS3Agb3KuUXJzsn+y7y612hRMHiT/2Enpme13XGmG0ZXODR51P+4Kd5Z0m3QyWVA5m76RdsYdtY/KzeGX7IKU9onRhFMw+Vh8T5p/2joAK2MY+gtiRGrK99jE+0SSBl8XZaFn/E1LDdjxSNNCsGPhnvRgvXfWIwMOthukhEg80bHnACb9/kbnGeLVj1KAT18A6XIWmxWIL/4gTS0y41RSc 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)(82310400026)(1800799024)(376014)(36860700013); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB7567 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:10:a0::39]; domain=DB8PR09CA0026.eurprd09.prod.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM4PEPF00027A63.eurprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 2203a64e-a5e6-4bb5-b96f-08dcd7e9a605 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|35042699022|1800799024|82310400026|36860700013; X-Microsoft-Antispam-Message-Info: CLeFIVJyUYOHBIcuy3vfRbKnwiKOy9kBb6vOBfdaOgt/Mn1t7+zMWu2maOE5sMwosiXlKhs2yUf9zLrTZu4NO4wjHFGWnb44J8gmflEkQNNlnPBuUb7uY5maogDRPUAngZOoqOhsPwrOQOOze77HSnFl4paHX6YzXHdP9KsRpXkhce0g0nIPd6BZGoHNdUFl17vE/0cMNDnKFjGmvl8x7hdu156wBOy8Mts9E02UPebdCZ/HyIwhGevS7uodDcHBMqXnAc9+aCZX1+CRN30E2utx+amzkNj5jJqy4358mWAgCQv48bvmD2k39ZkW8FgKVvVLK1WHRLtyiTsB08m7SWftHs4KghXt4HIdnFfMF7UQzbseKS8GZiHOiethrfE2DeIbgb+ZVa6yWOysx2BMClFClZR5fTM7orllhrfCeEX+liCPSNXZnY2V13sex68K9dpXoCvSn67Y/IgnL63BmBtl0MF9e/AYeQKFqdCFRCzZL12cCnh3sgeR4ja9M+Mm1SjfDZkMFDCwZhRrFQnGiSmRrvhTsnOrQ6kTcbPLsaiCWgdb47oxPYRoNxMMAXt6eRBc8bKt0IcDd6y2L13cMxNTDDmxxagRNleIf62qvIUuhghcNcQVkjbycJRUcYBt2/Qpekt4NqdHq6NEHUXY4SH6HqUaMrMWWb2YbQ2Mw5CUYt9FuLsoyyK4soMS1zSfZlopVcT5MB8J22Yc7HyyR+juvSSNEx/TqrZKCcF6K0WzTgCyxix5GDAS74y/6X5XzFHA1MeJPa3JJPmuupqVpiYYW7cVQlRFAOvG3o13GKM6bDocxp0HzBAjg0JDKsyrj1ETGFHhB3tIkHZypPsdJgOt76jeeI07VDwhQM1o5Xe7csxBQUeQpiX4z7ar4+vsNgBh3n4b//hrT5Mc7BVgJKuwdWPL31VwcPbgFVKPku8KB5z/xOrYKBdjGqFR9uDwdvqknrGHM6TgyQ20JS3mlKD6E9ePB+dwefPZ8qrGBg1jErA/7E/2Y26lsE39LwumH1BKv4zzn8nFoZQ1rfZjf7ieDzqFQSDzeO/U+h0rXocE0glXPS7t45JGDFKGWgk00DcrnmASEwv1IbpaONnmfYd/TJNfHQz3AyEDA4DDtl6iDWMCftilpQg0AzlCRuyFEdGXL/aIZOzMafjeL4A2q5/Ci/h4U2uoWLHg2ccDFnIUn6lF/BwECBKu5hHO8DtR+JXJFLIMohBDME961HgTkqiU6FXUKGe20Y1vb4XeC5puPIaz2c2/2MeZXZhXuY8Pp9xTolcbGAh2uAUffKjTXv0XyCD/iFG3Sokwfkk2+ZHWFPMO1smin7yjDf0p/fwBK9+npY3W+J5UidUU/K5P6g9xNBZ5cw7c+xhgcNoLBCMufrCjdrjXhVigral1HmFmTC8EUMYAMGZMD10NP7DnYKbYrVd8vpyfB0Icq6o/hZCBskZWCtOEq+zDP7HY3FNT 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)(376014)(35042699022)(1800799024)(82310400026)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2024 13:56:20.4361 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 95b684e3-bcb4-4ba5-f26d-08dcd7e9acb9 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: AM4PEPF00027A63.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR08MB10895 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 RA state register is local to a frame, so it should not be copied to the target frame during the context installation. This patch adds a new backend handler that check whether a register needs to be skipped or not before its installation. libgcc/ChangeLog: * config/aarch64/aarch64-unwind.h (MD_FRAME_LOCAL_REGISTER_P): new handler checking whether a register from the current context needs to be skipped before installation into the target context. (aarch64_frame_local_register): * unwind-dw2.c (uw_install_context_1): use MD_FRAME_LOCAL_REGISTER_P. --- libgcc/config/aarch64/aarch64-unwind.h | 11 +++++++++++ libgcc/unwind-dw2.c | 5 +++++ 2 files changed, 16 insertions(+) diff --git a/libgcc/config/aarch64/aarch64-unwind.h b/libgcc/config/aarch64/aarch64-unwind.h index 94ea5891b4e..52bfd540979 100644 --- a/libgcc/config/aarch64/aarch64-unwind.h +++ b/libgcc/config/aarch64/aarch64-unwind.h @@ -53,6 +53,9 @@ typedef enum { #define MD_DEMANGLE_RETURN_ADDR(context, fs, addr) \ aarch64_demangle_return_addr (context, fs, addr) +#define MD_FRAME_LOCAL_REGISTER_P(reg) \ + aarch64_frame_local_register (reg) + static inline aarch64_ra_signing_method_t aarch64_context_ra_state_get (struct _Unwind_Context *context) { @@ -127,6 +130,14 @@ aarch64_arch_extension_frame_init (struct _Unwind_Context *context ATTRIBUTE_UNU aarch64_fs_ra_state_set (fs, aarch64_ra_no_signing); } +/* Before copying the current context to the target context, check whether + the register is local to this context and should not be forwarded. */ +static inline bool +aarch64_frame_local_register(long reg) +{ + return (reg == AARCH64_DWARF_REGNUM_RA_STATE); +} + /* Do AArch64 private extraction on ADDR_WORD based on context info CONTEXT and unwind frame info FS. If ADDR_WORD is signed, we do address authentication on it using CFA of current frame. diff --git a/libgcc/unwind-dw2.c b/libgcc/unwind-dw2.c index 40d64c0c0a3..5f33f80670a 100644 --- a/libgcc/unwind-dw2.c +++ b/libgcc/unwind-dw2.c @@ -1423,6 +1423,11 @@ uw_install_context_1 (struct _Unwind_Context *current, void *c = (void *) (_Unwind_Internal_Ptr) current->reg[i]; void *t = (void *) (_Unwind_Internal_Ptr)target->reg[i]; +#ifdef MD_FRAME_LOCAL_REGISTER_P + if (MD_FRAME_LOCAL_REGISTER_P (i)) + continue; +#endif + gcc_assert (current->by_value[i] == 0); if (target->by_value[i] && c) {