From patchwork Wed Sep 18 14:05:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu Longo X-Patchwork-Id: 1986829 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=AkbLWihh; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=AkbLWihh; 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 4X80nH28sCz1y2j for ; Thu, 19 Sep 2024 00:06:27 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 451D2385B510 for ; Wed, 18 Sep 2024 14:06:25 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2060d.outbound.protection.outlook.com [IPv6:2a01:111:f403:2613::60d]) by sourceware.org (Postfix) with ESMTPS id 01BE0385828B for ; Wed, 18 Sep 2024 14:06:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 01BE0385828B 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 01BE0385828B Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:2613::60d ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1726668362; cv=pass; b=ufvW8rRaZQ4abW0YO+tJsLtgIGGOfWmJXF3W4rPnwhrcvD96NRSE6udprIREbAVNhgyNmw79c7tce+PPxrscPb1+Zk0AEr07KGDyWpv5keiFbp+cdlcu2ofsTejjIJx+1hYiPQ6VqQYD9mOTFUJ7T0N9kG7qU/cq77ryYqD4/gY= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1726668362; c=relaxed/simple; bh=RRZSof8NB+wWpLwwfsGrd7UBP6WE+Jlgs0i34mKpBIQ=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=NKjPk8LRoq0m9fWTPTKvVFDTMmLPSybv8z5ZvgkouRL9wF3kSEnvCB8MOi6Sh0cIjC22/X+slgOk83XvlYa7BX+DK6SOxjqyTqKkNRw5m/BU9W5o59B0K20wX54L9tdnx5YKNvU9nAUUk9vTtZLId8fr+QH1bIBKsirAr1RmHIU= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=NkXF3lpKgcfyoQ/YpxnqJpZKOmTYzyNMPZoOSOdPQYi6SJ3Ar+fglCjqaEMlzUMYNeiyE3An3cGve1SFeVnhDaZBYhDyuvFR5MW4nCwBghhf88syY/x+ay7c7AJlDp8YYG//BbsKJA+CSTKXcR//9M7Xp142GjpIdSb3e/IGO6B3zE0tyiufwt4+iXyYZ1BYx06/ldF/VUGzQBacQooyJifbjFHB/KluxRLqr5oa5d3HKsqAgb1KNi6CGZXGWVrT62nlae42eprDiumIzOKbJqfSusSiiMCqMDV1BQ3MFkYtecXoNr/KQ5MKMAL/I2FwO5myc0kbpIpi9ILc6facFg== 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=sKl4NPHGHjUnXYzWync080qlmqHthfi+p7VGZ6XJseA=; b=kLpUKFliwZgvdP/ig7/SK7PTzqw8I8IMhE8LRUoaPkb9qVLkTu5Y1sShW9RAvCONz9VSxHqpS9arKpIOwMPAAX4NXqFEK5/PyAsGIcN0OhV3qKeUpMx6JmZgKAsa+/EonDrCTljLwZxtoMoA0soxjqxq0SO3pQWa3kXEoE/URQ2/1jNzE7f4jQbIUmy9h2Pi2yF3oHP+wwosSl6FEcVOsksTgkpLomUT0eL1TY85BJQV9iUC67EQX5tXcaVrKyKNPIK3p0JXmPWqUbg3fTxYZlUrEa6MbCL7Ze0llaX/x76IV6P7eZWT6x38kjvoFJepKBEP+GnrGyH/f6AuJ2RWug== 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=sKl4NPHGHjUnXYzWync080qlmqHthfi+p7VGZ6XJseA=; b=AkbLWihhdS0eo2kbmFAKscKra+stUoJPtkByVomzWxCboaUjlM7Y1BDKCx/2IlfUdd0b7kHvQPCiLZRwvcXQRsXYoXS/w9BdctdMFpGZJs7AjrpoxLVBW3c6NnxiBlOYbKhS35JPx001CFvv9xtaeADkBsELQvamsui8zK82Ats= Received: from AS9PR04CA0083.eurprd04.prod.outlook.com (2603:10a6:20b:48b::29) by AS8PR08MB6342.eurprd08.prod.outlook.com (2603:10a6:20b:31a::22) 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:05:55 +0000 Received: from AM2PEPF0001C717.eurprd05.prod.outlook.com (2603:10a6:20b:48b:cafe::11) by AS9PR04CA0083.outlook.office365.com (2603:10a6:20b:48b::29) 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:55 +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 AM2PEPF0001C717.mail.protection.outlook.com (10.167.16.187) 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:05:55 +0000 Received: ("Tessian outbound 664db2787079:v457"); Wed, 18 Sep 2024 14:05:54 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 0e9a223a5fd4374c X-TessianGatewayMetadata: iw/yZ5V1R+sJnxSdw/YQ5nedrqIsoOVuhRDCrd1as5UOke9/YGBBftVjdn3bS+5shoBqSp5LrvZBD9fW01h3VL456StvNMDZiBaULfLuxC53jJRhQrD89Wpv0lVWhi627nLqX10UwdB+gbTBWwEt8SOEKH07YHL2wqll6evYJj0= X-CR-MTA-TID: 64aa7808 Received: from L16465ac5ae02.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id F8571E15-68AD-42F6-BD6C-2B21A9976943.1; Wed, 18 Sep 2024 14:05:48 +0000 Received: from EUR03-AM7-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id L16465ac5ae02.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 18 Sep 2024 14:05:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=VHnWsFNuTsIOc3uekWldEZvtOkXeExgTNEwIEegNuEBWeCGVA6dHr1Dh7MdyYoOVJWbGtDypJQWUUSnQGZZ4gr7G9tayXFZzzANd02AuYAC9V5XXxcnxXSTGzX1gIUyEd3unCv+a/N1XMLzyDXVRKF74AKd9Reh3NH1nI6f1cybZQOG4VKmVa/5y98AZR5v5a/Rff3UrBrUWVsqfe4AzlAKTe476b0ryzTm6cuu7fOkX+07yN7yKsUtTm8ZkPGYC58pwzTItkEZ7HoHKGN7eOXE+qnb3h0zh65lP42KK0Fo80S8SaCnF+pB4eZ9RK9sHLjPV82BhrF9LDBssWl5ptQ== 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=sKl4NPHGHjUnXYzWync080qlmqHthfi+p7VGZ6XJseA=; b=nFm2HHhuJxAYQl0quU4Y35popRliKG2utRIgHkFyL7rxfYRHrakTHuQla23/cOuUmUy+6j5xSJQ6KskJrl3WlALqQVl+dT8NWLmeOLp6TD5CCs0ENhpB8+uakp432+PEgqORvXM2XgSu1JTS0IK7dhahAzKsnTWgP+VIUJNlTVTwSlUqL55XULD+qNqT7S8zwuo4qdHM111EdYOmNbJ1kbIM9q9Rmq5QvcwPA9XV+XUH+ZVVsc9G47+16wSyFolOuNkmTmnej4+kQ1j6hXpiIuL88bcw3o2LiKNUxPBP3WB7q6IvF1X+hFofakq5a28lCUnlI+yoMMqhmgqLSjVIng== 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=sKl4NPHGHjUnXYzWync080qlmqHthfi+p7VGZ6XJseA=; b=AkbLWihhdS0eo2kbmFAKscKra+stUoJPtkByVomzWxCboaUjlM7Y1BDKCx/2IlfUdd0b7kHvQPCiLZRwvcXQRsXYoXS/w9BdctdMFpGZJs7AjrpoxLVBW3c6NnxiBlOYbKhS35JPx001CFvv9xtaeADkBsELQvamsui8zK82Ats= Received: from AS9PR05CA0115.eurprd05.prod.outlook.com (2603:10a6:20b:498::31) by AS4PR08MB8218.eurprd08.prod.outlook.com (2603:10a6:20b:51d::15) 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:05:40 +0000 Received: from AMS0EPF000001B7.eurprd05.prod.outlook.com (2603:10a6:20b:498:cafe::b2) by AS9PR05CA0115.outlook.office365.com (2603:10a6:20b:498::31) 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:40 +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:05:39 +0000 Received: from AZ-NEU-EXJ01.Arm.com (10.240.25.132) 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:38 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EXJ01.Arm.com (10.240.25.132) 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:37 +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:37 +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 0/4] dwarf2: add hooks for architecture-specific CFIs Date: Wed, 18 Sep 2024 15:05:31 +0100 Message-ID: <20240918140535.1538392-1-matthieu.longo@arm.com> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AMS0EPF000001B7:EE_|AS4PR08MB8218:EE_|AM2PEPF0001C717:EE_|AS8PR08MB6342:EE_ X-MS-Office365-Filtering-Correlation-Id: bf5b1d60-9339-4d34-aa9c-08dcd7eb0361 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|36860700013|376014|1800799024|41080700001; X-Microsoft-Antispam-Message-Info-Original: 5sGzMUQyKUqeSHeawT5BPrQaUde7RVJTgzzwJQELRKVINGckWYNCrRVfi5R5QN8O3KFHLyaY8txhQkWjItz8/GZXNygGbWJ3wLelaod8xK+OUBLcDVLsDBtzzpPffeqN5CcDeqB374P+Z4/mX6/UCj63/60b4gYEPDX8ffkLyY6I4U8E6zIDjm3fsAwxKAdo+TM3/YjmERTTuKQHgL8hU4VWQsmwz1cl48QzNVCnVdKw3FatvJvtVlJkxdvKK8VHr+lwb6QnoiRaTNeOMO5yEIDem4GkXmSm3/jafhFQlDuz7py/smMsUBvynF+b1P2ZIawxqQaEMOrfsJJz4ChOFOb8HrYNPjstmLkMhdAPHtY+MM2UPR/18dhP+KpYsmnYRjvItzVlzTEIL9GzcOULJb/OiMPockT7cUVJ3+/f7emVt58thrk4MbjwXamPlb+Ef1puMzd8aV0DHVQW4dE8VORjp010rtyP1/A6KlRRAAlAARaghaEny07R11SvWo4HOUIvMF7X/82+NkGKpwZkf5P9IRfgBSJYOB2jJE5ttHLOTNbXa3tJytyRhjLblebT3PTdol2/xsC/T7D7SFMiOK0qhXbqpq2DQzZ8A9b1vurF+0NpKkrCwo7RuWfSHcVm7ZMsgp+Uk2IjG1OpxxbInSIBfbTq1ysvhhBFaZGaTfb88LI2LCIzYgsYnXHFzIFl2gpoBSqj5hNF7CyEpBwTcl7BGz7kRW0GTL/OEuWnJGItImWSwseBXTXIHi5GSEEjqKTKwOzWihymZHWmHMrv0Ae53mGSMph88s3jqNYZWId+CXiCAZu7KKykc4gXmuGHNpL0ya+SW4JmyIXPQbB48vUQYKhNOUi+Z6f7U3mK0vdUU94mgad2CbK2XkQpHxd8DpseaP+MLtdpkf1U8V2+TXT9LTUg0O9ZtJtDoQFdTxWkP19etDJhBKuS+b1mB4Qv6nbBEW9ZRIFr5EHv7P4Kvx1rKcW0uRmra20npbnXg/Eb21SBJjYKYd93EkOBnpch0WjqLtA7q4FIceSYUYCDY23JCduRWOFv6+kyEAm1T9SvN7S6A1ipc4EhOXXdWKUBK0hutqDdCsrCgbECkhUQ8uMrbD7Rzb/LO/3kYC6xyerAQc5sd5aajVVquq8dgtQIxov+99GqGr9Ln7XIEXiAT4wphgHRn1fAeXg64wN3xN6k7tYC+mKQ2mGqHjM37+MIuLjao3XS96zwh3QcjjmvtHdoLQziex5He6DVqOQ3cFk3idr6lpMb7HVOKdhA6XDLBdQtxw7tKo1EgWuoJO/hI433RivaX18BR4CS2fAlbNnV3MHukytQlw/YHHIThywXcDgYi0u8o8lqopvPRNs6SAPhugLxVvGESPb6EpwG4tcIrlxD8/keHL628PzuD07Bk3ssz2X5lE9dssCSgrWZB25xkChIAEpa0wWfvkWCIY8= 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)(36860700013)(376014)(1800799024)(41080700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR08MB8218 X-MS-Exchange-SkipListedInternetSender: ip=[2603:10a6:20b:498::31]; domain=AS9PR05CA0115.eurprd05.prod.outlook.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM2PEPF0001C717.eurprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: c129607f-f31c-46bb-24ba-08dcd7eaf9cd X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|1800799024|82310400026|36860700013|35042699022; X-Microsoft-Antispam-Message-Info: 738xjgeKBp/ojhuOshTO1Tb3tApr5hQeLiQs3SSAZkebNizmIcFtTO1o3QcM7B2rXs0M1XBYQnqCx3JVhAV5SI8vyWdwLPrk1ME3+PSW/GTvnTcfDcVS6wOUhpPM3Yv5xsmM9inXMihDqq3aGYX1F3+52SbcXykQvUdcJoA4ur3Q2BFMfsZ0qnuLz4xShb05ovoZRniuFObCfVDxDw7N+gCWY5ybhaKtzj51pok1T6la/3lmR5Rvc07PqfBSPbV0NTXqhzJ6ES+gH4I4tKlbXBnIin62MQWZByD/YR9a8oJQ6ZVicZHofvxylZv5c/+jGlKiYXbsE1ee/Nq04sGY3Jbjzdy18muWz/bNJ63b9UyXw1m8MV66wqpm9txed2AJzZP2xFul0qM70b80TCiZNjTvz+MhjhzFHLssTpUvp7w37YtoHa8shr2jbrl+Erv6kpKvPrE4LT4qF8+8hJaqmSkrEEK2bWPxN5nK49MhNBBnffkPgTZYlXIAFkc84KrvV2n9+cQJtshXsd3Hgr7+SdM4sUVv+yFmY55+UCFG86RDvFYytSVTZPKArxdCXI5UNjNma5b3hs2SuEUaYkftc4hypdzgQDOSR6dh15+qZbtt+NIaehe6+XcgHwMJTSzycw9OMbH9qlm3z81jh5SHZF01av9N10DoGbNIaTNmYdcB1cG1V27rN3Lg90D6OXGCMfaP7LWnYifBuuinqn90FsLt2u3TDQs/aHbonvtnIzqGpJwW6PAFlG6ySMzVpSmv/J/iWZ/LQA4KXSyWjoXHyweG0dlXQi9yqhsHKjktKIXQaAdxTN03hUOcm6GH7r6LqX2RYzaiyhtC/Ebg2+lC9+Jwd2s2AIX2jhTMsoaRDg0HT1woho7EjDmDmIEOrniLpTQ60g14ckuwY+Do57AuzfMssUrSCLzeI10pSk+VAKB65fLMzLUJ3iaJ37TCzhRFYcPtnd0qx688FtDE1m/AElXIBmsrDnYkE+eI77DDJqk4DMG/tzs+gYWIChpuIXkvnU7QJySHqNj74sYC14/DepRZcZMBiV9rkli4IapUdDgmy5e0CsnPUyv0NLfMxzYrtzJy76MeXy59o//7qmGJ8Y2v0wTnFgroxB/Oqju8csbA2xIeL7/laSTBpJLPEQUufVdic4d1Z04cP/g8OmCzFfnqC9zWhSkvgWBLAyV0atnQmrgbEcDAQmB3YnE3cC2KgiO3AiFpuPSOlSBGkymfexfgvJEwsONCyZXdtN4bLbkqkSlMOJ5sghEBTnNmBdo3y+wUbVVE51pPG6pyHogynOju6L5oDcKDfBG+QYHWMhm/aC/CD5nXHs/ncvQkm9E1HCXyRx7bYVGu/jiSr0ve2AzVilmW6cgP9Mdfv3e5TE8cXx/EZe0RvFKEJ++uRvndpgJtegfzlni6HcmpVQXwWA== 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)(1800799024)(82310400026)(36860700013)(35042699022); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2024 14:05:55.2692 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bf5b1d60-9339-4d34-aa9c-08dcd7eb0361 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: AM2PEPF0001C717.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6342 X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NONE, TXREP, UNPARSEABLE_RELAY autolearn=no 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, contrarily to what is expected in [1]. 1. Rename REG_CFA_TOGGLE_RA_MANGLE to REG_CFA_NEGATE_RA_STATE This patch renames: - dwarf2out_frame_debug_cfa_toggle_ra_mangle to dwarf2out_frame_debug_cfa_negate_ra_state, - REG_CFA_TOGGLE_RA_MANGLE to REG_CFA_NEGATE_RA_STATE, as the naming was misleading. The word "toggle" suggested a binary state, whereas this register stores the mangling state (that can be more than 2 states) for the return address on AArch64. 2. dwarf2: add hooks for architecture-specific CFIs 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. Only AArch64's and SPARC's backend are impacted. 3. aarch64 testsuite: explain expectections for pr94515* PR94515's tests in AArch64 G++ testsuite were lacking documentation. They are now thoroughly documented. 4. dwarf2: store the RA state in CFI row 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. References: [1] DWARF for the Arm 64-bit Architecture (AArch64) --> https://github.com/ARM-software/abi-aa/blob/main/aadwarf64/aadwarf64.rst ### Diff between revisions 1 & 2 patch 1: no change. patch 2: - fix issue with default hook signature for new hooks. - code style formatting. - change targetm.dw_cfi_oprnd1_desc signature to match the one of dw_cfi_oprnd2_desc. patch 3: - add comments suggested by Richard Sandiford in test case gcc/testsuite/g++.target /aarch64/pr94515-2.C. patch 4: - code style formatting. ## Testing Built for target aarch64-unknown-linux-gnu and ran GCC's & G++'s testsuites for AArch64. Built GCC stage 1 for target sparc64-unknown-linux-gnu. Ok for master? I don't have commit access so I need someone to commit on my behalf. Regards, Matthieu. Matthieu Longo (4): Rename REG_CFA_TOGGLE_RA_MANGLE to REG_CFA_NEGATE_RA_STATE dwarf2: add hooks for architecture-specific CFIs aarch64 testsuite: explain expectections for pr94515* tests dwarf2: store the RA state in CFI row gcc/combine-stack-adj.cc | 2 +- gcc/config/aarch64/aarch64.cc | 37 +++++++++++- gcc/config/sparc/sparc.cc | 35 ++++++++++++ gcc/coretypes.h | 6 ++ gcc/doc/tm.texi | 16 +++++- gcc/doc/tm.texi.in | 5 +- gcc/dwarf2cfi.cc | 59 ++++++++++---------- gcc/dwarf2out.cc | 13 +++-- gcc/dwarf2out.h | 11 ++-- gcc/hooks.cc | 14 +++++ gcc/hooks.h | 3 + gcc/reg-notes.def | 8 +-- gcc/target.def | 20 +++++++ gcc/testsuite/g++.target/aarch64/pr94515-1.C | 14 ++++- gcc/testsuite/g++.target/aarch64/pr94515-2.C | 41 +++++++++++--- include/dwarf2.h | 5 ++ libffi/include/ffi_cfi.h | 2 + libgcc/config/aarch64/aarch64-asm.h | 4 +- libitm/config/aarch64/sjlj.S | 10 ++-- 19 files changed, 239 insertions(+), 66 deletions(-)