From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by sourceware.org (Postfix) with ESMTPS id 4B75838A9094 for ; Sat, 17 Dec 2022 06:41:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4B75838A9094 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=oracle.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=oracle.com Received: from pps.filterd (m0246627.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2BH4WZf2007056 for ; Sat, 17 Dec 2022 06:41:54 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2022-7-12; bh=abSEON53Pbvx6fiGCX2k/b64OstSPHIakar2zy+mQHw=; b=1or54fXpASZt0aVeZRumabAbdYbW7a4xQwXCTGkGzKB/PTmwLPgi66dJvihm/tIkdcSI fOz0+UsqOtzQgCKNQ0JItfVqY+FzaFF+cIMm3/YDOMTvzYJYUpiv+4XBNGFQQ0Ycn7NT QoFeWUlD6XrsGebAS9hrVpJbM266zHstdvSB5A73dSo0EzaaSfkxRXju0O6yZi/PPh7x +b6wD6ZJSaWsOjaaPirsblk9bzE+6N8WAMBT0f5Oem5A34fuimJ/TYEc3t0X4bTATKjp ZEHrOOQtz/uYaaZ05MRc54UmlIMUnlpzHcXHvQh9cwsqPtkw9q9RO+vKL7/h4oOqWczX Jw== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3mh6tqr2b1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sat, 17 Dec 2022 06:41:54 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 2BH58KFu024784 for ; Sat, 17 Dec 2022 06:41:52 GMT Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12lp2174.outbound.protection.outlook.com [104.47.55.174]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3mh477p2wf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sat, 17 Dec 2022 06:41:52 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O7ic2UIvQ0L5QUUVU6ICOnqUUIhPlXo+CqwHGhPTk24lOZNMGtgChjuwSP47/Us9DGuh42QMVXRt57fN9O07AQi10NV7p+HR+JwdpWpzNxWEL2OUGAEFNQkeEbdQSTTXiaUP/30uhn6goyWLkTvrrmJ3qq2XtLrWZbU1Jy16AeMv2giPOojnwmFIB5B5WEzMxXVdgLnN35rnDMkT88Ci/skc++nzH5WUJ9inumFH4SIiFELPdHn8DBiDercl5Hqw3syZCcxPYosPiC5OpxdQv+iof1S2UUzz370Bhl/JPdMQPNO2A4v8NyPbemtLaxUT5twtZ5Rxxs2W9d4ehn7VrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=abSEON53Pbvx6fiGCX2k/b64OstSPHIakar2zy+mQHw=; b=YxkgVQwh1HUyZaflCz/GuOep9SbDNe2FXlkj3VnLqRqSN1LIZ/8O3wePAcq3P4LIjfhJ32xOD3UrqJFPFL725blkNm+Tc3O9rzecAFAfQfZA3zJYNDCCGdb5hNcsEU3NfiBmrh/Aa5Vfl6qwyyjhFFWu9Zv18lPhzkawNi/aCSSLNTeASmfdPIU7SEWUqf9kvqchyHHkq+tdADdUwu577mNpBPbAZqTfsCmo8qadhu3ZKZ0bJ4YDlTG67Hj1zOgtu19fOsIVdvB1VgSJOBc5y3/oGhGawx0OIufcIIt3NpsNUUytK26UpHcAfsLXAFFV5BXhrA7peNLibI0z1wOrAQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=abSEON53Pbvx6fiGCX2k/b64OstSPHIakar2zy+mQHw=; b=xh5SHAxYlEAFTTqtFqc1ITPTwt/GkBug18K9eHA+15ocPxHpiryGfeuVz/I7MmwAEdhbhzs1i40bThLIT6Nrh0OOdyd8TG0nXejhiN5Pg7dlODS5iIjnD4igbsx5mKcZejNuSMI1efcrF+sVrK7MCzj1AKMLxloZTzjPBO0QKhE= Received: from MWHPR1001MB2158.namprd10.prod.outlook.com (2603:10b6:301:2d::17) by BN0PR10MB5285.namprd10.prod.outlook.com (2603:10b6:408:12e::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.18; Sat, 17 Dec 2022 06:41:51 +0000 Received: from MWHPR1001MB2158.namprd10.prod.outlook.com ([fe80::ee70:1952:4416:1bdc]) by MWHPR1001MB2158.namprd10.prod.outlook.com ([fe80::ee70:1952:4416:1bdc%5]) with mapi id 15.20.5924.012; Sat, 17 Dec 2022 06:41:51 +0000 From: Indu Bhagat To: binutils@sourceware.org Cc: Indu Bhagat Subject: [COMMITTED, V2 2/6] gas: sframe: add support for .cfi_negate_ra_state Date: Fri, 16 Dec 2022 22:41:24 -0800 Message-Id: <20221217064128.11326-3-indu.bhagat@oracle.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20221217064128.11326-1-indu.bhagat@oracle.com> References: <20221217064128.11326-1-indu.bhagat@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: MWH0EPF00056D0B.namprd21.prod.outlook.com (2603:10b6:30f:fff2:0:1:0:b) To MWHPR1001MB2158.namprd10.prod.outlook.com (2603:10b6:301:2d::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR1001MB2158:EE_|BN0PR10MB5285:EE_ X-MS-Office365-Filtering-Correlation-Id: 6f2b196f-4b7e-4b43-cce5-08dadff9c744 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hDdI8/NNAn3SEFs4k2vq0Tc/RbKScZs4rjY5QGY+yFewpei7RRR/o6vMg04LKgMXpVqNCsLKO40bHjChbfJuLTHVWiJ5TI0fE+FVy+zHBLCvjxpMRikSAsJrnMw8NmhyqNg87v+sCwag3N1P9loi+2Vdrex2+2zMhL0r1VlfxJcmexQ6/Dlfn306HGzHoyJ3BdDh702L61vvW70NWdg/P5rG3czdqnO0smRncu+kpxLr/G4KduTg3Jyfb21n+kqkBXi3X3kDD0AimIYCybVEE2vK7PxgodfxA/mwGIBVsH3riEzFx867X68FDBHfNe+lb+Gx4PjxicSVcDC+2II4CMZ5pF4LPyhLdUhkQ0H1gw/Z1SzXDXF7gL799A1pj4oGFoUdY5xgLyLDk3a6UW1LyuLBoPz1PA7bi28p2mPxgKPpnSkiWNQ9JTWm7KdwVtDo8jJWqxn8/gvXLZDDPyk6tJY0KXd7E/EyiUxjr5jnq6LlcszwkFLfEOyEveNn9EXJBeRMDryigaA1vUP4XkXH0eUQEwFk2JZlwGGEYIvSBicNZoYmsCemvpcoK8mfjzBvLW2gaymJGiIHd9PZd16EFSSnsLb8OSW21eIRYUBuDQ3vC/1tuDSFINmf7KlhsLrYGFfxtFhre3+EWi+etssHG5K7j1uFMdrxj3UxdMzdC7B9aHZ2bSFy13/P1pYP5qujAS8oQbCqzcQ3tUQthc7FOA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MWHPR1001MB2158.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(376002)(136003)(396003)(366004)(346002)(39860400002)(451199015)(83380400001)(2906002)(38100700002)(8936002)(1076003)(186003)(66556008)(2616005)(41300700001)(66946007)(6916009)(36756003)(316002)(66476007)(6512007)(86362001)(8676002)(6486002)(4326008)(5660300002)(6506007)(44832011)(6666004)(107886003)(478600001)(142923001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?PRo62Kp2/3GSXnKj9/SmuFaO4Fmu2uiT11EbgLNWqLo2n5/bOwMwTufSWA2A?= =?us-ascii?Q?+T07gMrp5drIaK2ehIt2FrsjI5FU5hDJMbMPk284azWPDKMdPZKTvhh/zLdv?= =?us-ascii?Q?MWSUrsYGtTBq7g6iRrxTdnZeWN1tLNRo3nn975i8R+zQzTXdMesnp9IsAg5x?= =?us-ascii?Q?DXDfcRFNWU61I/ZEGX0pgPjHSBoleCZ5YfzX8lDpam0qZrpmCSsIknOqYqtY?= =?us-ascii?Q?pef6tkXqFRPMvkH2RT3VGTPoG/caGdzf1plbY6l7WyuOnQDyeQtFVj1yc2OB?= =?us-ascii?Q?yA7NYjsfePHhe4f7P8RAMgS4NgbqPBJU0tR3km6vSk7WSdShVDJ4wqinvj0e?= =?us-ascii?Q?h67gTe36DOCupG8JSqFFmD9CrJUZOZzeoXwDEghXBWKPeQwesxYPFzVRPOdS?= =?us-ascii?Q?oR1csVo2QudZB0UWN8lC5MWLxBszkn84yqpXmFz3wDluFAKVeLofCs+nyRBC?= =?us-ascii?Q?uzCBjRqT/EyP/dUlNo7R4NcHgGA9xmV5MHT6UyIqN/IvpwVBgdy9ZOABSJIv?= =?us-ascii?Q?EYuQv9vjUSscHgaQlmmsuieEA4BasqcWanniM9IIiXynKUy6fveXreWW3Dyw?= =?us-ascii?Q?VFdv01z84TbzFXTmeCY7rihP6LGZNa/anyWub7pMR12umdm9CkJH4cgR8U5y?= =?us-ascii?Q?uTiUST924gzluWscgHHIvEyefQ5lWFLiT5RXMjqo7dR1DaLRjKi+KRH8z4fk?= =?us-ascii?Q?lsupDSSoDQhgy/jsz4QUE2q7WgKU3LrXliw5lg5iMbwJT0ZPNDvyIwoXujx6?= =?us-ascii?Q?UzN6q94xLCOEFe1IOJY1UK3ukbzmJHmCx+av/fBk59kLicec5Z7xFBffPiuH?= =?us-ascii?Q?D45Dl55M3pjOWMeMcph9C/J+kqdp0E04+bt2NtJypm48tvy+grdgFf7QKmz6?= =?us-ascii?Q?QLMl5PnEniXsvy7MhxugR9oJahi21WMCGspE5qIHGOVOfvJ/7ySDYPh8oiIf?= =?us-ascii?Q?/d0qgv5eIbJaC2SCrHLTuW2q6dnsGBtAP3fY/93i8J0j7zjxo+idbELh++Gr?= =?us-ascii?Q?i3+NK9LvAYHZW0KgoCxQAJ/C4XT5KyiGv2IsC3CHq2mBWJFr3decpT3OaYgK?= =?us-ascii?Q?VUP0OgxbF1vhlZA/tnMpi6z2nHceZA1tRrIVu9Sz1aAcNfwaJ0xktUrmvLp1?= =?us-ascii?Q?o2vxjJaEIlyA9JzAUnsx5+XuoMNDHdyqDghmia56S4hIQPMp3HRYgLpVWjWV?= =?us-ascii?Q?+VHHRa46hsVv7yL9lCTeo54tI1kMKGzmFBw4nHzfLkYZFdk1Zn034Shhy1m4?= =?us-ascii?Q?hmcm/9XqEYQ2P2sbkddzHSaRsqEJH0s34nTgyenHTyUcJB9XCBJKAs9wKgZE?= =?us-ascii?Q?sJZlniZ/vpaHCCTrJHohZd/qK8S4owWhGcRxPUYVQ7RTIJJQBmjv1TPaQO/6?= =?us-ascii?Q?eLkbOdmfif2oBnemKzN55X2xoXSiwUdWXSQkcZKRFLGgRgcLm4N8vINIPBtS?= =?us-ascii?Q?EPifDRKrBGlB8ZGCbEzsXihbOgFv0jg9yt7W5fjY+3Y3+CRM4uskxfyHmOwJ?= =?us-ascii?Q?mNgyBOUkCEDikGZLhEzt0mqI/OGhnn+BDGQEEZn/vxeAmBaEo5twT/iATUMe?= =?us-ascii?Q?YFOivmMNjmZY0IqdWnnJuRV6kw8UdsKVyUJmR3uME70RCcHoLMatLwRNPOtz?= =?us-ascii?Q?/MJCbueoQ3JNMktJ0CQNKG4=3D?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6f2b196f-4b7e-4b43-cce5-08dadff9c744 X-MS-Exchange-CrossTenant-AuthSource: MWHPR1001MB2158.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Dec 2022 06:41:51.2028 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 659EtDbJmgrdKPzNReDYPItfOlx3+4/8RRWCsft7RYjbdxsu9fiwLVC/oOximj3CYR9Sd4zsnc0lwLHFJCH0MQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN0PR10MB5285 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-12-17_01,2022-12-15_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 mlxlogscore=999 phishscore=0 bulkscore=0 malwarescore=0 spamscore=0 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2212170057 X-Proofpoint-GUID: bMNjbCMPYd8y8TyzLjC-LIBCEBT7FUqJ X-Proofpoint-ORIG-GUID: bMNjbCMPYd8y8TyzLjC-LIBCEBT7FUqJ X-Spam-Status: No, score=-13.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: [Changes in V2] - bugfix: set merge_candidate to false when processing DW_CFA_GNU_window_save. - Instead of removing common-empty-4.s test in a later commit, remove the testcase common-empty-4 here in this commit. [End of changes in V2] DW_CFA_AARCH64_negate_ra_state in aarch64 is multiplexed with DW_CFA_GNU_window_save in the DWARF format. Remove the common-empty-4 testcase because the generated SFrame section will not be be empty anymore. A relevant test will be added in a later commit. ChangeLog: * gas/gen-sframe.c (sframe_v1_set_fre_info): Add new argument for mangled_ra_p. (sframe_set_fre_info): Likewise. (output_sframe_row_entry): Handle mangled_ra_p. (sframe_row_entry_new): Reset mangled_ra_p. (sframe_row_entry_initialize): Initialize mangled_ra_p. (sframe_xlate_do_gnu_window_save): New definition. (sframe_do_cfi_insn): Handle DW_CFA_GNU_window_save. * gas/gen-sframe.h (struct sframe_row_entry): New member. (struct sframe_version_ops): Add a new argument for mangled_ra_p. * gas/testsuite/gas/cfi-sframe/cfi-sframe.exp: Remove test. * gas/testsuite/gas/cfi-sframe/common-empty-4.d: Removed. * gas/testsuite/gas/cfi-sframe/common-empty-4.s: Removed. --- gas/gen-sframe.c | 42 +++++++++++++++---- gas/gen-sframe.h | 6 ++- gas/testsuite/gas/cfi-sframe/cfi-sframe.exp | 1 - gas/testsuite/gas/cfi-sframe/common-empty-4.d | 14 ------- gas/testsuite/gas/cfi-sframe/common-empty-4.s | 17 -------- 5 files changed, 39 insertions(+), 41 deletions(-) delete mode 100644 gas/testsuite/gas/cfi-sframe/common-empty-4.d delete mode 100644 gas/testsuite/gas/cfi-sframe/common-empty-4.s diff --git a/gas/gen-sframe.c b/gas/gen-sframe.c index 075720facd6..9baf20bd873 100644 --- a/gas/gen-sframe.c +++ b/gas/gen-sframe.c @@ -243,10 +243,11 @@ static struct sframe_version_ops sframe_ver_ops; static unsigned char sframe_v1_set_fre_info (unsigned int base_reg, unsigned int num_offsets, - unsigned int offset_size) + unsigned int offset_size, bool mangled_ra_p) { unsigned char fre_info; fre_info = SFRAME_V1_FRE_INFO (base_reg, num_offsets, offset_size); + fre_info = SFRAME_V1_FRE_INFO_UPDATE_MANGLED_RA_P (mangled_ra_p, fre_info); return fre_info; } @@ -275,10 +276,10 @@ sframe_set_version (uint32_t sframe_version __attribute__((unused))) static unsigned char sframe_set_fre_info (unsigned int base_reg, unsigned int num_offsets, - unsigned int offset_size) + unsigned int offset_size, bool mangled_ra_p) { return sframe_ver_ops.set_fre_info (base_reg, num_offsets, - offset_size); + offset_size, mangled_ra_p); } /* SFrame set func info. */ @@ -507,7 +508,7 @@ output_sframe_row_entry (symbolS *fde_start_addr, fre_num_offsets = get_fre_num_offsets (sframe_fre); fre_offset_size = sframe_get_fre_offset_size (sframe_fre); fre_info = sframe_set_fre_info (fre_base_reg, fre_num_offsets, - fre_offset_size); + fre_offset_size, sframe_fre->mangled_ra_p); out_one (fre_info); idx = sframe_fre_offset_func_map_index (fre_offset_size); @@ -845,6 +846,9 @@ sframe_row_entry_new (void) for the supported arches. */ fre->cfa_base_reg = -1; fre->merge_candidate = true; + /* Reset the mangled RA status bit to zero by default. We will initialize it in + sframe_row_entry_initialize () with the sticky bit if set. */ + fre->mangled_ra_p = false; return fre; } @@ -890,6 +894,9 @@ sframe_row_entry_initialize (struct sframe_row_entry *cur_fre, cur_fre->bp_offset = prev_fre->bp_offset; cur_fre->ra_loc = prev_fre->ra_loc; cur_fre->ra_offset = prev_fre->ra_offset; + /* Treat RA mangling as a sticky bit. It retains its value until another + .cfi_negate_ra_state is seen. */ + cur_fre->mangled_ra_p = prev_fre->mangled_ra_p; } /* Translate DW_CFA_advance_loc into SFrame context. @@ -1150,6 +1157,23 @@ sframe_xlate_do_restore (struct sframe_xlate_ctx *xlate_ctx, return SFRAME_XLATE_OK; } +/* Translate DW_CFA_GNU_window_save into SFrame context. + Return SFRAME_XLATE_OK if success. */ + +static int +sframe_xlate_do_gnu_window_save (struct sframe_xlate_ctx *xlate_ctx, + struct cfi_insn_data *cfi_insn ATTRIBUTE_UNUSED) +{ + struct sframe_row_entry *cur_fre = xlate_ctx->cur_fre; + + gas_assert (cur_fre); + /* Toggle the mangled RA status bit. */ + cur_fre->mangled_ra_p = !cur_fre->mangled_ra_p; + cur_fre->merge_candidate = false; + + return SFRAME_XLATE_OK; +} + /* Process CFI_INSN and update the translation context with the FRE information. @@ -1195,6 +1219,11 @@ sframe_do_cfi_insn (struct sframe_xlate_ctx *xlate_ctx, case DW_CFA_restore: err = sframe_xlate_do_restore (xlate_ctx, cfi_insn); break; + /* DW_CFA_AARCH64_negate_ra_state is multiplexed with + DW_CFA_GNU_window_save. */ + case DW_CFA_GNU_window_save: + err = sframe_xlate_do_gnu_window_save (xlate_ctx, cfi_insn); + break; case DW_CFA_undefined: case DW_CFA_same_value: break; @@ -1207,10 +1236,7 @@ sframe_do_cfi_insn (struct sframe_xlate_ctx *xlate_ctx, - ... Following skipped operations do, however, impact the asynchronicity: - - CFI_escape, - - DW_CFA_GNU_window_save, - - DW_CFA_AARCH64_negate_ra_state (multiplexed with - DW_CFA_GNU_window_save) */ + - CFI_escape */ err = SFRAME_XLATE_ERR_NOTREPRESENTED; // printf (_("SFrame Unsupported or unknown Dwarf CFI number: %#x\n"), op); diff --git a/gas/gen-sframe.h b/gas/gen-sframe.h index 93af499278c..5d5702a57ca 100644 --- a/gas/gen-sframe.h +++ b/gas/gen-sframe.h @@ -50,6 +50,9 @@ struct sframe_row_entry on it. */ bool merge_candidate; + /* Whether the return address is mangled with pauth code. */ + bool mangled_ra_p; + /* Track CFA base (architectural) register ID. */ unsigned int cfa_base_reg; /* Offset from the CFA base register for recovering CFA. */ @@ -140,7 +143,8 @@ struct sframe_version_ops { unsigned char format_version; /* SFrame format version. */ /* set SFrame FRE info. */ - unsigned char (*set_fre_info) (unsigned int, unsigned int, unsigned int); + unsigned char (*set_fre_info) (unsigned int, unsigned int, unsigned int, + bool); /* set SFrame Func info. */ unsigned char (*set_func_info) (unsigned int, unsigned int); }; diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe.exp b/gas/testsuite/gas/cfi-sframe/cfi-sframe.exp index eb6da614c2f..8129e86ccce 100644 --- a/gas/testsuite/gas/cfi-sframe/cfi-sframe.exp +++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe.exp @@ -82,7 +82,6 @@ if { ([istarget "x86_64-*-*"] || [istarget "aarch64*-*-*"]) \ run_dump_test "common-empty-1" run_dump_test "common-empty-2" run_dump_test "common-empty-3" - run_dump_test "common-empty-4" } # x86-64 specific tests diff --git a/gas/testsuite/gas/cfi-sframe/common-empty-4.d b/gas/testsuite/gas/cfi-sframe/common-empty-4.d deleted file mode 100644 index f7a6062d392..00000000000 --- a/gas/testsuite/gas/cfi-sframe/common-empty-4.d +++ /dev/null @@ -1,14 +0,0 @@ -#as: --gsframe -#objdump: --sframe=.sframe -#name: SFrame supports only default return column -#... -Contents of the SFrame section .sframe: - - Header : - - Version: SFRAME_VERSION_1 - Flags: NONE - Num FDEs: 0 - Num FREs: 0 - -#pass diff --git a/gas/testsuite/gas/cfi-sframe/common-empty-4.s b/gas/testsuite/gas/cfi-sframe/common-empty-4.s deleted file mode 100644 index f97ca2f7ff9..00000000000 --- a/gas/testsuite/gas/cfi-sframe/common-empty-4.s +++ /dev/null @@ -1,17 +0,0 @@ -## ARMv8.3 addded support a new security feature named Pointer Authentication. The -## main idea behind this is to use the unused bits in the pointer values. -## Each pointer is patched with a PAC before writing to memory, and is verified -## before using it. -## When the pointers are mangled, the unwinder needs to know so it can mask off -## the PAC from the pointer value to recover the return address, and -## conversely, skip doing so if the pointers are not mangled. -## -## .cfi_negate_ra_state CFI directive is used to convey this information. -## -## SFrame does not have any means to represent this information at this time. - .cfi_startproc - .long 0 - .cfi_def_cfa_offset 16 - .cfi_negate_ra_state - .long 0 - .cfi_endproc -- 2.37.2