From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by sourceware.org (Postfix) with ESMTPS id 26F843858C39 for ; Mon, 1 Jul 2024 02:54:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 26F843858C39 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=oracle.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=oracle.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 26F843858C39 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1719802462; cv=pass; b=A6b3D/RrWjaiUiSdeyz/+J9gzXBzNs4S9P8X189UhJo7GGWRVybGlOyHX6RXfUvFd8tMsumbRighnrxkx3HPO0AsavtP7ONXkK+a/JE0rG98cCsdAtVdAMDTHVFOk9o/wdOl5z2AuP+McWjx8oGPxUo0/JPKshgjcVLS1Mj/eNY= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1719802462; c=relaxed/simple; bh=bDFDorbELGoNnCArdc0fkV9rdscXiNYIiuShBBZpoVY=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=XNACr0U622RGU5tX1r64qua0nbzpTsHLCeP+laLy9efUW1PKk9KBmLO0mooEZ+Prqq4Nioa9sXu8tQ5B3zbwNxIqbkGS9tn8O6VovRyeqR0f8mPkMzCUaPXzrkSayf+belwRS3x90VZnrY8E3+b/Hvx3D3IEsBwQ3HZjwFBIdtY= ARC-Authentication-Results: i=2; server2.sourceware.org Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45ULj2nv022273; Mon, 1 Jul 2024 02:54:18 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h= from:to:cc:subject:date:message-id:content-transfer-encoding :content-type:mime-version; s=corp-2023-11-20; bh=AUiIdapZjqlca7 kEjn0h+nsuvHsmhC8Njsu+dnPnZ/A=; b=nNiz7kCN1sOrGFAZXZ/M7voGdjBtRB IObdL+oVfwbpSQkN5GbM3kG6P8dINxcfWPqmxN9bim8w6ZjAPfffooI1+VtVzOQ3 XPdLremR4OwWaP4mRY2NVAAQcUZ7N/hKFPyKY804LPN4uWcUAJ0HvY3GyR9ucidj VNDLhM6kdESoZ3Ord2LvVrddBHPjPxWgvpoaZbQ/cjt8filKx6wJ9Hb76A6JhwS1 DbPG7tzUf2+sk9YYWXFUmqXdGuxfcQPFyJEJ1BHSodEWRzrpNqo3lQ4l5bGOxddQ FmvnC04xmKSleLBJIqyBLoL3ssP8ZedOsP7Xnluhz1BXLja1YLRY+laQ== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 402922sqx3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 01 Jul 2024 02:54:17 +0000 (GMT) Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 4611bkhT018345; Mon, 1 Jul 2024 02:54:17 GMT Received: from nam04-mw2-obe.outbound.protection.outlook.com (mail-mw2nam04lp2177.outbound.protection.outlook.com [104.47.73.177]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 4028qc6xss-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 01 Jul 2024 02:54:17 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BWdR7vtRAX6Xno4JLgPXQkHexdxif2fMWFzmjBNZthYO/AuycTBfxgY1tgEgch1wxw0dxOjh0UmJVontsY59DtrSMxQvC6iu0mmM468tyOCxGk5hjmiz5wd8IslwBCOxmp80pL/Rt0MWj7G9BQF9aPkildCKnDRRsJZL3rQEbe0c5Sd2hDW6AzTcRqfQVQQBVJS4XiaJ2JeKmyFavNhWOwP18bh9Yj+tXYJ6ih+IongSZJ7Mp5FO7zeO3VV4O95VzDglyNkJ3HfEevpEGYSG+Hqp/7v9r2SgM5j37BcRoLr9i8ktZ9CA0wG5mpfplHolmP5lvIDpb9QriktOUwhvDw== 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=AUiIdapZjqlca7kEjn0h+nsuvHsmhC8Njsu+dnPnZ/A=; b=N4OWQjeZdLU2ADg807Vw6o+AcHAy1UDkm8f2fffi+oLt3RO5UgWfJG3JphS5IK4Mc2jlzdSSPZ5djlsD90wpocc/41OfvD83VWEsN4xeIkrfoT+CzIpM3kgKY4RYijoSApnqnWvKBrzZApl6ZaLxePchkdksoKTk9Y93Xs2W6KBvwn8k+ELiBm8KLNB/vc/K1OQrNEWY3MdE6znfhZB9tJ/iDrJL8R/c1EvHYQAvyqt6WWvdjczgFeCytQ4VCfxvoDcWjCnn9OrJ0D9iInraf02ELeDN3UpMIdiQfvvdh4DFJXt8CwqqceCNVLDRhOkOS84Hfqzgv99IKHYGBo4zug== 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=AUiIdapZjqlca7kEjn0h+nsuvHsmhC8Njsu+dnPnZ/A=; b=PtznUi+Wqc9kmujMdXRINy7lawCW0LOm9ainB93GYo9FbVKncMFs0hUKF4BDV3srpeUZgtSfeyjCG1zISVKWZwUG5qRpqy7W3DrlSrCguTTZ7tZM+HdMwmX93v/AiBqnKP0Lsc55Aeau/FLWQHTb66W7kM7BdRpGLGAjB+71P/4= Received: from BN6SPR01MB0022.namprd10.prod.outlook.com (2603:10b6:405:78::23) by SJ2PR10MB7708.namprd10.prod.outlook.com (2603:10b6:a03:574::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.34; Mon, 1 Jul 2024 02:54:13 +0000 Received: from BN6SPR01MB0022.namprd10.prod.outlook.com ([fe80::a770:dad6:5f84:f165]) by BN6SPR01MB0022.namprd10.prod.outlook.com ([fe80::a770:dad6:5f84:f165%5]) with mapi id 15.20.7698.025; Mon, 1 Jul 2024 02:54:13 +0000 From: Indu Bhagat To: binutils@sourceware.org Cc: richard.sandiford@arm.com, Richard.Earnshaw@arm.com, Indu Bhagat Subject: [PATCH,V4 0/8] Add SCFI support for aarch64 Date: Sun, 30 Jun 2024 19:53:56 -0700 Message-ID: <20240701025404.3361349-1-indu.bhagat@oracle.com> X-Mailer: git-send-email 2.43.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: MW4PR03CA0139.namprd03.prod.outlook.com (2603:10b6:303:8c::24) To BN6SPR01MB0022.namprd10.prod.outlook.com (2603:10b6:405:78::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN6SPR01MB0022:EE_|SJ2PR10MB7708:EE_ X-MS-Office365-Filtering-Correlation-Id: 793a7108-e0e6-4f6d-ce7d-08dc99791693 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?r2m7lA+YWgZY6AZBdmkkFNM7BDb/gBWb7PNG4XctN7ioCRCLS3MqwAyb3X89?= =?us-ascii?Q?wVqxGg3xreyPLL1qRHSterU6nR5yNw4eScOVq8y//mxHsBUXG+LeBYz9cfZ5?= =?us-ascii?Q?IFsBVpUy9RvhoNU0gCLCHffwLnlO8DJldR/FjUE71GOkZIfk4qYtI6Kj0D6X?= =?us-ascii?Q?zRzT9QQOvHC4IOoV6pIksU1ZCQJjylSxFvGRT3fNZ/YBcPjV3SXlfbFQmoqE?= =?us-ascii?Q?6fq9K8bHO0bRDz1Lhzbq33HNBIWqdkBs5uq+gO6DGz28Rd3Yr9j+eY/XfDO+?= =?us-ascii?Q?r4o4TPnQ315B9wcbhwrZ6oj+FaXJz+eiINzWTTKCQ1XCOY6chIag9oPkvYFZ?= =?us-ascii?Q?+oMpZywwjSb7Eld7OPwzJi8gFYI5x6z/ZVncW9YelGroj6yNzM2C7SGa0UdO?= =?us-ascii?Q?TAXSrt+Wu/xm0a3ntjpX70B+jxgwAKuyMSSCFsYQDmo4pN1/29EtDPemgw1j?= =?us-ascii?Q?Mu7OwexXaOoYGnydYrDPxxiBQbXH0zVmHGcH/gStdmxF93QjRi842SCs2uyW?= =?us-ascii?Q?71YeaBXZ81FJQLkZkq3cALOVEPF8h5/xt/OLh0YK2UpQzfeS4eTWUUZkCF7x?= =?us-ascii?Q?8ycKCbtyYj0lsrBFbhPAwrbve0fe/dtyJV/29KcO1Rldt6m51SgTDtx6O27a?= =?us-ascii?Q?pRjlu0QANM+eKhLW4YzlrYd0S9yqe2EpxlHv4QISEjztuA+poGCdwR2ljiJr?= =?us-ascii?Q?7RDfxbKDJ2Xkx5aOXlcrk+NmNMxHwSRNEs2iVSTMQEx2VDRNenzFVCFqlCG8?= =?us-ascii?Q?MMGkD8YiLr+fS4s+8pDLJfARanpRXc1bQstM+xUnnDoE/aKAJlhlQh/omy09?= =?us-ascii?Q?IgMqiPJbizXzoNs5EMirxeJNMkv1HiCo0GlvGQhde8W/qVOC16IBmwfBAQTL?= =?us-ascii?Q?XEdJsuHvnuaWclbOup69F/G4rLHThxjjIFz1Kf6wbnCDfpXpm9QbUUnrTlmi?= =?us-ascii?Q?BmFHmRlxN4Sn5G4zVlr9KEeFGPrqvIjPkWRUtd6E+nrqM30BNsz9EWetVibu?= =?us-ascii?Q?KsIbgM7xNEt8c/47+4Usc8J8yfb73rL4zWz38N1Pw8d+OivGykuEii/r0wyl?= =?us-ascii?Q?Og2uOzirg+Toby4qjBBcHMGaET5I4pR0D0WwafQKaSIdEZ7WhB0HUHWwr32S?= =?us-ascii?Q?oCd656lNwWHStNbSXpSn6Xd53Wo7CoKRVa+MqVpqPSYzZSXU+fQiFg373gcN?= =?us-ascii?Q?5TevR0LbxmscfH0AAKFg8r98/+30dTImMKoDQBbvSyhpY40VWL7rATiuA0CV?= =?us-ascii?Q?sGDahtpDm3SYWHeUr7wmQUyOAcRjtjAUEo7ZDGHSi70QGk/4ShBQOZyEeF1q?= =?us-ascii?Q?1/w=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN6SPR01MB0022.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?MYh/+t9JuXALurqlz/JYYDYLlQaNXB8wv9uh5mCWj0B4b5RwblbXdcs0vHAp?= =?us-ascii?Q?6A/8qDEMdfDctyU4t4PeCdPGSyNYALgWX1TIE3wrB9DogH+dudJ0ciStPMd4?= =?us-ascii?Q?gH1/ySYAg4yhCOdLwUXAQpxFbDTlnbAxHCKu0SgDwfA4z54uQ+dEPj6gjZhf?= =?us-ascii?Q?YbXiqpwzPsEhBShFsZl29fate6R9nS0PkVnfwhIZ2SfTgEnTOdf87t8Wbov1?= =?us-ascii?Q?hDow+vr7MhFAeC7dx7YBeZZe3Dgo+z0Lex4l8Ht6hhjsH/zD2NN7Viyut9dn?= =?us-ascii?Q?NIcCOxnjNlTmy3V9eePY81EZj1nAwO1uBlnV+oG2Yhcke4zUkeTGHcnD0X3E?= =?us-ascii?Q?tHh1hni7DhcMZy+o8Uu/qg9PwXsQPWVRTzTP6Z8+fhxkK6WRxyWVBJTDvzGJ?= =?us-ascii?Q?5GlVD7jJjtxcr4yPJpx2dfVfn0m0zTp6h8QgHnBWAcECtSlKj6LjgLYDwfwL?= =?us-ascii?Q?z8v09jHlnfrb1FDqHy93JP6YYTy3k/lfgOeFbKj4PGAvTOiwwz3ETiVqMe7C?= =?us-ascii?Q?4d/m8zutWHgBfXTV+3w5DFjhMh/QXNhZCoUFGx1Q4NmYM9RIAzPZlMVD6LjV?= =?us-ascii?Q?Jrxhaog5CbmhxBvItnZZjPLe7nAlk1bd0r4kTYR2SPdJDFAIh93++jTUQWdF?= =?us-ascii?Q?vjvaD4K8RuNJ2uTKAJ9ElpAvk2u3gi4RavIBn1a47fUgwhxQgt4yeQvcX2hK?= =?us-ascii?Q?dyczFeh26laEqe3MMU2kSsep6V9VFJ8+qAXp1kuCVydebipqSBhHsZX9ise5?= =?us-ascii?Q?+XA+QWzo/2CxLZEtJJpL/J6eKnEeVpwvOSjQT3exhEFMYRezjOGxQx5bhavX?= =?us-ascii?Q?xOTQuSZRYTOmh/yQO/ovpM4hBnhWdfXR6jjFWZSqC49TIfuYwL5YjJXCZEnn?= =?us-ascii?Q?X5O+jO2iv85TYTRo4WBN61SNx9lm5EMQlzzY/AcbA525XXP8+CSiRgTqRxS5?= =?us-ascii?Q?R4jCldhT8qleJ3U0gs/YSaa34M1ImRguuBazYWThwZB2FqI3Mib509QCMQTg?= =?us-ascii?Q?QYc4DGWNmKCmWQ2akYlafPgK2IGapZwDEofmV9pWn5JNmzSMiuGjxaKdODvQ?= =?us-ascii?Q?/gGVYJW5oKp3+NPkgVVZ74bYcFi2xNndieC+7xdGLi5JCjfPo24LUKvlpY41?= =?us-ascii?Q?XOlk0kZWifL+TPoH5xEnadpkrtoSuHUDjc9RpFoQg8i/wK/8ZeodvXXg9JOO?= =?us-ascii?Q?jluB7/uc0gvR6J9CqbyIvh0C92nX9J0SwUKqt4gq8enAbLos51jyFgl/n3lx?= =?us-ascii?Q?rFpRUm4Rup60MzqwvJRsoAEFUfzFJvSsKdhvS+R0UzS4JU/rMM8I/rkI+xLo?= =?us-ascii?Q?7yPYy7i1aLg/z1Ha6Gf61eMSfCHj7Lz8YVXrQZjCTn6DcWHwv9F1g8kCzvZf?= =?us-ascii?Q?nj6Z+MsTkss/lhHgiG1aBXJFy88Z8X5dq4+KIEmbxsipamQMfG53u4aVR7OT?= =?us-ascii?Q?1KSaG2Cjl9RMd0i/YE4UgnFXMsgKwS3AuTXMvl3bjdsxg9QUKbEgzTRR4hRc?= =?us-ascii?Q?QiNW/4T+c1mcQGPP4DmVVw+PmdMRqg66FF1bzyVBjROJ1bEglAWWxiNi+7rH?= =?us-ascii?Q?Hd83h2jc8djnZmyAkmUwYnSeFLWpxLSTZdzdG5ds2XKW3bjjUZcG+MmsyUbm?= =?us-ascii?Q?g0sfoCSk8xgm0ysLSRX4c9M=3D?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: BuAbo1rdEYSyDzlXVLyooTNts2ot3CWLiIqHVaaA/2t/SReDSWtlGx/txIjCsx+h9F1NO+/lZz1JR3oKD4OAKLn7rcdR0TwHty84J6EIGjKWY0Pe1aEAghImCNgVsuGbIKK12GxFcEsEjXGlCQkLNSsSaiR8nylC4dMhyDVsYXn/deqQqDSm1RIrUdwM6QMc50+srNK4CsXz1rKiCyez3xGot6B2xbieoiox/3DPkeebGOgcPzg5heNoZnn0d1bi9NvWxC+0Tj/CjeXT9gtYjkNeMMxhL9kQWqtQgmit57v2OCMhPB+CKGAUoJo2hyDSEEzozj4DBB+Ji+jC+qe/EJ6wbsyR2dWqjkJ2ovc3Bx/zR2nIMQJTIhTrBY+7u1dfEZrZiNpNDFG6hwkCs3fgtah+MjwxfuzHGJh181bQZMzHOE8ry9N+o0Vt92+X5isZ8eZc3XJpcSB7Qr/qVWJgp/OowaBOs0VrYWivlDPesre6665dkhja29dd0XLIYoI7Pi8sA0HfYeoIrLr+Xspq/fe59J1SSboLhce7yKFwE5ojiUCwxVtmKKinUwzsyZLfqOzMm41W3kBCqe918vyctcdsLxzgp3yloXZjIm591fA= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 793a7108-e0e6-4f6d-ce7d-08dc99791693 X-MS-Exchange-CrossTenant-AuthSource: BN6SPR01MB0022.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jul 2024 02:54:13.0442 (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: SseXKIhYJb6K6uQTN1aHLGSlIn4qp4Qat5qVSB5oANpFtk43L99qbRqBFpN9r4rJ5o8uoewILXSm4vz73yiEHg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR10MB7708 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-07-01_02,2024-06-28_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 adultscore=0 bulkscore=0 mlxlogscore=840 phishscore=0 spamscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2406180000 definitions=main-2407010020 X-Proofpoint-GUID: tJi7_oqvGG8R7yvqd77hzVjDaCzsXV4E X-Proofpoint-ORIG-GUID: tJi7_oqvGG8R7yvqd77hzVjDaCzsXV4E X-Spam-Status: No, score=-6.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_NUMSUBJECT,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,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: Hi, This patch series extends GAS support for SCFI to aarch64. For more details on background, motivation and short notes on design, please see the link to V1 posting: https://sourceware.org/pipermail/binutils/2024-April/133557.html The V4 version addresses the review comments on the V3 series: - Subclass flags: Add subclass flags for only those iclasses where SCFI may need them. All insns in these iclasses must have a non-zero subclass. All other iclasses must have a zero subclass. Enforce these checks on subclass flags in aarch64-gen.c. - Include FP/Advanced SIMD registers into the set of callee-saved registers: D8-D15. Ensure both D and Q registers are handled on little-endian and big-endian. Z registers are skipped from handling at this time. Added this to the set of known limitations to be addressed in a future patch. - Added more testcases. Link to V3 posting: https://sourceware.org/pipermail/binutils/2024-June/134842.html The V3 version addressed the review comments on V2: - Use F_LDST_SWAP for lse_atomic ld/st ops. Link to V2 posting: https://sourceware.org/pipermail/binutils/2024-June/134461.html The V2 version addressed the review comments on V1: - Carve out the ginsn creation functionality for aarch64 in a separate file. - Add additional flags in aarch64 insn definition to indicate subclasses. Although self-explanatory, here is the outline of the patches: - [Still needs global maintainer approval] Patch 1 fixes a bug I ran into while testing the series. - Patch 2 is new in V4. It seemed more appropriate to carve out the new subclass flag definitions in a patch of its own. - Patch 3 to 5 now specify subclass flags only for instructions where SCFI needs further classfication within an iclass. - Patch 6 is new in V4. This implements some checks in aarch64-gen.c around subclass flags in instructions of specific iclasses. - Patch 7 and 8 implement the aarch64 ginsn creation and SCFI testsuite respectively. Known limitations ----------------- These are planned to be worked on in the near future: - The current SCFI machinery does not currently synthesize the PAC-related aarch64-specific CFI directives: .cfi_b_key_frame. Other opcodes used when pointer authentication is enabled also need to be handled (braa, brab, retaa, etc.). - Supporting the following pattern: mov x16,4266 add sp, x16, sp ... - Not a limitation per se, but a note that ATM, that predicated insns are skipped from ginsn translation. IIUC, these instructions are not such that can be used alongside stack management ops. To be double-checked. - Functions involving save / restore of Z registers are not allowed for SCFI. The SCFI machinery currently issues an error as no ginsns are created for such insns (which may may cause incorrectly synthesized CFI, hence the error). Need to address this for little-endian and big-endian. Thanks, Indu Bhagat (8): gas: scfi: make scfi_state_restore_reg function more precise include: opcodes: aarch64: define new subclasses opcodes: aarch64: flags to denote subclasses of ldst insns opcodes: aarch64: flags to denote subclasses of arithmetic insns opcodes: aarch64: flags to denote subclasses of uncond branches opcodes: aarch64: enforce checks on subclass flags in aarch64-gen.c gas: aarch64: add experimental support for SCFI gas: aarch64: testsuite: add new tests for SCFI gas/config/tc-aarch64-ginsn.c | 797 ++++++++++++++++++ gas/config/tc-aarch64.c | 15 + gas/config/tc-aarch64.h | 21 + gas/scfi.c | 9 +- gas/testsuite/gas/scfi/README | 2 +- .../gas/scfi/aarch64/ginsn-arith-1.l | 35 + .../gas/scfi/aarch64/ginsn-arith-1.s | 16 + gas/testsuite/gas/scfi/aarch64/ginsn-cofi-1.l | 30 + gas/testsuite/gas/scfi/aarch64/ginsn-cofi-1.s | 16 + gas/testsuite/gas/scfi/aarch64/ginsn-ldst-1.l | 78 ++ gas/testsuite/gas/scfi/aarch64/ginsn-ldst-1.s | 34 + gas/testsuite/gas/scfi/aarch64/ginsn-misc-1.l | 27 + gas/testsuite/gas/scfi/aarch64/ginsn-misc-1.s | 13 + .../gas/scfi/aarch64/scfi-aarch64.exp | 70 ++ .../gas/scfi/aarch64/scfi-callee-saved-fp-1.d | 57 ++ .../gas/scfi/aarch64/scfi-callee-saved-fp-1.l | 2 + .../gas/scfi/aarch64/scfi-callee-saved-fp-1.s | 50 ++ .../gas/scfi/aarch64/scfi-callee-saved-fp-2.d | 57 ++ .../gas/scfi/aarch64/scfi-callee-saved-fp-2.l | 2 + .../gas/scfi/aarch64/scfi-callee-saved-fp-2.s | 50 ++ gas/testsuite/gas/scfi/aarch64/scfi-cb-1.d | 20 + gas/testsuite/gas/scfi/aarch64/scfi-cb-1.l | 2 + gas/testsuite/gas/scfi/aarch64/scfi-cb-1.s | 14 + gas/testsuite/gas/scfi/aarch64/scfi-cfg-1.d | 31 + gas/testsuite/gas/scfi/aarch64/scfi-cfg-1.l | 2 + gas/testsuite/gas/scfi/aarch64/scfi-cfg-1.s | 46 + gas/testsuite/gas/scfi/aarch64/scfi-cfg-2.d | 40 + gas/testsuite/gas/scfi/aarch64/scfi-cfg-2.l | 2 + gas/testsuite/gas/scfi/aarch64/scfi-cfg-2.s | 42 + gas/testsuite/gas/scfi/aarch64/scfi-cfg-3.d | 32 + gas/testsuite/gas/scfi/aarch64/scfi-cfg-3.l | 2 + gas/testsuite/gas/scfi/aarch64/scfi-cfg-3.s | 34 + gas/testsuite/gas/scfi/aarch64/scfi-cfg-4.d | 41 + gas/testsuite/gas/scfi/aarch64/scfi-cfg-4.l | 2 + gas/testsuite/gas/scfi/aarch64/scfi-cfg-4.s | 41 + .../gas/scfi/aarch64/scfi-cond-br-1.d | 20 + .../gas/scfi/aarch64/scfi-cond-br-1.l | 2 + .../gas/scfi/aarch64/scfi-cond-br-1.s | 13 + gas/testsuite/gas/scfi/aarch64/scfi-diag-1.l | 2 + gas/testsuite/gas/scfi/aarch64/scfi-diag-1.s | 6 + gas/testsuite/gas/scfi/aarch64/scfi-diag-2.l | 3 + gas/testsuite/gas/scfi/aarch64/scfi-diag-2.s | 25 + gas/testsuite/gas/scfi/aarch64/scfi-diag-3.l | 2 + gas/testsuite/gas/scfi/aarch64/scfi-diag-3.s | 8 + gas/testsuite/gas/scfi/aarch64/scfi-ldrp-1.d | 59 ++ gas/testsuite/gas/scfi/aarch64/scfi-ldrp-1.l | 2 + gas/testsuite/gas/scfi/aarch64/scfi-ldrp-1.s | 52 ++ gas/testsuite/gas/scfi/aarch64/scfi-ldrp-2.d | 33 + gas/testsuite/gas/scfi/aarch64/scfi-ldrp-2.l | 2 + gas/testsuite/gas/scfi/aarch64/scfi-ldrp-2.s | 26 + gas/testsuite/gas/scfi/aarch64/scfi-strp-1.d | 39 + gas/testsuite/gas/scfi/aarch64/scfi-strp-1.l | 2 + gas/testsuite/gas/scfi/aarch64/scfi-strp-1.s | 37 + gas/testsuite/gas/scfi/aarch64/scfi-strp-2.d | 35 + gas/testsuite/gas/scfi/aarch64/scfi-strp-2.l | 2 + gas/testsuite/gas/scfi/aarch64/scfi-strp-2.s | 30 + .../gas/scfi/aarch64/scfi-unsupported-1.l | 4 + .../gas/scfi/aarch64/scfi-unsupported-1.s | 31 + include/opcode/aarch64.h | 35 +- opcodes/aarch64-gen.c | 19 + opcodes/aarch64-tbl.h | 146 ++-- 61 files changed, 2287 insertions(+), 80 deletions(-) create mode 100644 gas/config/tc-aarch64-ginsn.c create mode 100644 gas/testsuite/gas/scfi/aarch64/ginsn-arith-1.l create mode 100644 gas/testsuite/gas/scfi/aarch64/ginsn-arith-1.s create mode 100644 gas/testsuite/gas/scfi/aarch64/ginsn-cofi-1.l create mode 100644 gas/testsuite/gas/scfi/aarch64/ginsn-cofi-1.s create mode 100644 gas/testsuite/gas/scfi/aarch64/ginsn-ldst-1.l create mode 100644 gas/testsuite/gas/scfi/aarch64/ginsn-ldst-1.s create mode 100644 gas/testsuite/gas/scfi/aarch64/ginsn-misc-1.l create mode 100644 gas/testsuite/gas/scfi/aarch64/ginsn-misc-1.s create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-aarch64.exp create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-callee-saved-fp-1.d create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-callee-saved-fp-1.l create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-callee-saved-fp-1.s create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-callee-saved-fp-2.d create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-callee-saved-fp-2.l create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-callee-saved-fp-2.s create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-cb-1.d create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-cb-1.l create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-cb-1.s create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-cfg-1.d create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-cfg-1.l create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-cfg-1.s create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-cfg-2.d create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-cfg-2.l create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-cfg-2.s create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-cfg-3.d create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-cfg-3.l create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-cfg-3.s create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-cfg-4.d create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-cfg-4.l create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-cfg-4.s create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-cond-br-1.d create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-cond-br-1.l create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-cond-br-1.s create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-diag-1.l create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-diag-1.s create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-diag-2.l create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-diag-2.s create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-diag-3.l create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-diag-3.s create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-ldrp-1.d create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-ldrp-1.l create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-ldrp-1.s create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-ldrp-2.d create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-ldrp-2.l create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-ldrp-2.s create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-strp-1.d create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-strp-1.l create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-strp-1.s create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-strp-2.d create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-strp-2.l create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-strp-2.s create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-unsupported-1.l create mode 100644 gas/testsuite/gas/scfi/aarch64/scfi-unsupported-1.s -- 2.43.0