From patchwork Tue Mar 5 13:54:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Khrustalev X-Patchwork-Id: 86797 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0A18C38582AA for ; Tue, 5 Mar 2024 13:55:00 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2067.outbound.protection.outlook.com [40.107.21.67]) by sourceware.org (Postfix) with ESMTPS id CA53E385842C for ; Tue, 5 Mar 2024 13:54:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CA53E385842C 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 CA53E385842C Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.21.67 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1709646865; cv=pass; b=mqrMTOwtFuGCElHkYGRWjd/ov9P7x+q3wPCDrePCbhNNEJfO0c1rkg1oswZ+BRvZdViZxqGsAOa91IFzh/JiASIb3KSZOJsvAyriHibYK1wsqqetJHfgo00hVFPvlq9oe5Es3nXKnH0x0eHEOZd0FSKFqCoDtC3yTLBUA2bkdLg= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1709646865; c=relaxed/simple; bh=KqwIEanj9LYUKSSKxIOADahBMdmagIR7iIdtchIOM5Q=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=IS2SRB3ItGWJGBIG4DH1/zhZcrmWtvl6svetqxOUvqAovKvdwSApxYrjfqAtsKibgR7I8rfEKG5UIb/x2LGZPIg6EqtVR21atsZ5V6R/SK3NUtaG6HzPceoBohkIHTpq784Cv71AWWdxXMQ/r1JWd/52b9d/7iln3T/7gT5dvSc= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=LE5AJ1Y7izuoxGC95NLkPTxTw2BVdsnnR+RaVkgwaPXgBWA3Y0XRMiKX4OOtf9eCpBc6Fke+p/trhlsg1pMTTqbHGlx1luVudmSFfbthR100aq5d7Osc0R+rDg2DUnfFo3q1DkiZc+OHYm4LhLwbUU3Fu0ZYwDnTYqMGDPxbjt2bVWjo1uwdgmzOp08YVg9h7tj3yAXNRm5JPykFySIl+Rpc3Een38oJ3EjV2wmxZQ3w+axIl4AEKH4TJCjy2CbXxA4V7cO0A9JER+usOjGslihwHA+TnlSc5c2mBOvQ6h8TIFtRsOWo+dnf/5VyRruSjPa6hZ5lK9XAAPRsy3EWUQ== ARC-Message-Signature: i=2; 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=yb/Rc2yosOP6RhBw4BVgIbO6NbaeN5M8ob3FM6DR2sI=; b=c8x2s6liaIJc8cDtjwuu6DJFWubfV1P9+GcXF68jmak4vP80TrsJNgUgz4TnLgHeket7KYLxNPtI8Q6hwbScEHlPFvI07zGe8XbkW+b2OEHFC4Nper7c1OskYLbvAeilks+9bcYSflehabfLIcBfGSWE/EiNIlDAYoHQBz1reBj1Ln57TYi3Cf9mzmYWrvdWxSZdKAXn21qLWLSOD1zRZpEzGMLLCqpiqoLBx/i7NlkJmhWWooLUW6hpebutYGPSxUZmVik58IZ1fGA2pe1NfF8Vgifr5AdtABSkqE88whN2wSK25FFyMMuqLE2REvpKMOX1LtjI05UZ5eB/2qVcAw== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.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=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yb/Rc2yosOP6RhBw4BVgIbO6NbaeN5M8ob3FM6DR2sI=; b=p9FJ3rAdNI27gLyB767sAlaPOq87mJTWXj/HYyvD/+tRJcNgvJGIbilx2DLtT9rtJxtvCCfXyktCH4qQ4qykMFZCB78NRBhwtEEWdMeaZ1h59DE5vilDjdLBSDxUiqL7/EsfiJMIZG2XDmBR0Bku6R1DPzCKQ7yCpj2H2Y3TSak= Received: from DU2PR04CA0221.eurprd04.prod.outlook.com (2603:10a6:10:2b1::16) by DB5PR08MB10191.eurprd08.prod.outlook.com (2603:10a6:10:4a6::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39; Tue, 5 Mar 2024 13:54:17 +0000 Received: from DU2PEPF0001E9C0.eurprd03.prod.outlook.com (2603:10a6:10:2b1:cafe::d5) by DU2PR04CA0221.outlook.office365.com (2603:10a6:10:2b1::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39 via Frontend Transport; Tue, 5 Mar 2024 13:54:17 +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=armh.onmicrosoft.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 DU2PEPF0001E9C0.mail.protection.outlook.com (10.167.8.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.11 via Frontend Transport; Tue, 5 Mar 2024 13:54:17 +0000 Received: ("Tessian outbound 7b0d57313a48:v276"); Tue, 05 Mar 2024 13:54:17 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 7e8347b1571e5979 X-CR-MTA-TID: 64aa7808 Received: from 22e3a2ffbf39.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id F73ADB97-F5F3-45F1-8064-6ADB36E85E01.1; Tue, 05 Mar 2024 13:54:05 +0000 Received: from EUR01-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 22e3a2ffbf39.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 05 Mar 2024 13:54:05 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YNbzGzQogPjfggq6sfmDjV1tAsYvu5QCemXFpoJ6xIdzXM9uwZ1AGSUHiAm5Y/uC73A35Zg59oOi5RogzUPqT1pxtCA1Db6ZRrzxlP9s06FQY4Kq2LRPYqpmkasoTCx59zRl5gVxaX/uJQ436gROvMN1Fg9mkQb6R3Zj989jzXJadW6MMuiJCv/ZZzNVQTdXtCfLkM64ug9zOJdaGYiahQzjdTBNj8pOu4yxJi75ShSWaTuY2Nd2XzgVfZC5hkT/S+49xnkWHVBejlWAJV+s1wKAqUoTxLbR8HpmD97tAPgOPmw5Z2blVpQzAn3KLD3+N+v/XXe7bXIQGleJf1VjyQ== 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=yb/Rc2yosOP6RhBw4BVgIbO6NbaeN5M8ob3FM6DR2sI=; b=K2AA8bAmnl9QRlOimbaLYLVKJk+VnmDCa8PVPimARLtKWsbXjanVmYYn5gg95gck0FVddM6I29JWgJUmg4HQDgofBVQF/pJjPLkog2Gitnklj1pO2p6BGd1gGuJPbkZ3aHpRAS8+zoR6xx0wq+9uBpelKfSi/g0kYU8GmewLQL5OmFWPgscdlU3WzSDkuQWWw4SMCf5aUQZO0vBCpiGsi+863nyj/pv3BjFUfWtkBPs8GfOu3WwFVcMPaDsYkMXmN9vJUPhJ1VfG/kWhiSJjeJa5mXU+WumN9Oz1CBJSWySRuXeqPyOTkuRsbk4Mp8bt+E6ozXpWMs+/uz4MyzXEkg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yb/Rc2yosOP6RhBw4BVgIbO6NbaeN5M8ob3FM6DR2sI=; b=p9FJ3rAdNI27gLyB767sAlaPOq87mJTWXj/HYyvD/+tRJcNgvJGIbilx2DLtT9rtJxtvCCfXyktCH4qQ4qykMFZCB78NRBhwtEEWdMeaZ1h59DE5vilDjdLBSDxUiqL7/EsfiJMIZG2XDmBR0Bku6R1DPzCKQ7yCpj2H2Y3TSak= Received: from VI1PR08MB2989.eurprd08.prod.outlook.com (2603:10a6:803:4d::31) by AS2PR08MB9245.eurprd08.prod.outlook.com (2603:10a6:20b:59f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39; Tue, 5 Mar 2024 13:54:03 +0000 Received: from VI1PR08MB2989.eurprd08.prod.outlook.com ([fe80::663f:ad99:85a2:b79]) by VI1PR08MB2989.eurprd08.prod.outlook.com ([fe80::663f:ad99:85a2:b79%7]) with mapi id 15.20.7339.035; Tue, 5 Mar 2024 13:54:03 +0000 From: Yury Khrustalev To: "binutils@sourceware.org" CC: Richard Earnshaw , "nickc@redhat.com" Subject: [PATCH 1/2] aarch64: Add support for (M)ADDPT and (M)SUBPT instructions Thread-Topic: [PATCH 1/2] aarch64: Add support for (M)ADDPT and (M)SUBPT instructions Thread-Index: AQHabwSV4tvuVZ8Pq0+aWJCVTKk0DA== Date: Tue, 5 Mar 2024 13:54:03 +0000 Message-ID: <02A8192E-9B74-4901-8F38-5AD423311B19@arm.com> References: <4A36B5D7-1175-47DF-97CD-DA49D77842ED@arm.com> In-Reply-To: <4A36B5D7-1175-47DF-97CD-DA49D77842ED@arm.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: Apple Mail (2.3774.400.31) Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; x-ms-traffictypediagnostic: VI1PR08MB2989:EE_|AS2PR08MB9245:EE_|DU2PEPF0001E9C0:EE_|DB5PR08MB10191:EE_ X-MS-Office365-Filtering-Correlation-Id: dadacafe-06e1-4381-a194-08dc3d1bbff6 x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr x-checkrecipientrouted: true nodisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: ZYqjmtr9V6tb6UGk136cmQjzsUghhX+BXIEXgq3vxgONWQm6hhgNMr84JWDoTc+RTvhtzceon9e2vLUjxXpflazlbNtMCgpkVKWJghj3i7QJk0NlIHc5izD85zTst5+rRnkD/HC7NvdWGmLCLdU+qHYgI/6sFTKdi0tZTNvxJrhBVJOTMVsms1slhFEUPZjMv5stSGPArmSXpVz14oqH/PpxmffVeoJ1rWz0pHaDJE57cowgVhc+tnxNXnCQ+ZP3WcgteoeH//+ICBJWcwjxz//pa4r5lBBGCkL9f+llsyjpbOQ3Tn4UZ4HjD0nUTQ7HKisTodWwwcd0qb9zRd7f44ICHNR9kgCWN9YClNUk7YFeJVtDNjqFBddgqVUpuU7rt+whEUs0edd6QOGAejcTd8Mc1dnrnSBcCBcRiezpvXX6E7U3v68R9DyPWzUzaslAi0r2NjCV2WalZWTmsGpWrXhHaJQYx2/bHSunrdW10pYeNbfV0zq8yCuV7OIcKABuL9iId0FjqQN9fFBoCkLgOIXD2S9qgRa9lpyOO3dHFIRGoO6sifj698m1tSyp3fno6L5r1sJmP4yz7w7hGZraSaCt0XlYP8IK0hwY3mbW4veMgBck54iA0B0yLhf/usJ2g9Zj1OLlXDjqh9aoKm2jO5vOVLrrXr6wv/c/zdXKxJfATM0HkCd8YH8MVe3REZbhiIvPFylbEEGGByDuQLE+nA== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR08MB2989.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(38070700009); DIR:OUT; SFP:1101; Content-ID: MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS2PR08MB9245 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DU2PEPF0001E9C0.eurprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: e7eb4808-f198-48f6-f94e-08dc3d1bb787 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ybfkx9arWFKJUBi/xZhkUxcHLP/jsu3u7ak5+8GVRyxbKZqVJgTGEOdk5P/vPwR888QeCYQH2rZBjEPHGnQ+kMxngSVdj2uFaPPN2eS8fWw/JDkL1wI2ZzxSp4Lp1Hqpv8iG2Jh8o0VPT8HrjSvaFsfQIBZ4PJs4lZx1reMRKJxTOBbF/rRYv03DbSHigNVs3HWjKq4AAg+AgcF2KfWshtPbfQ0hlf/wkKPskz48VFz7OrAZTITxdQQiJye5Go8JHnZ5rQnK86UOFcE3OU7Zx14giROJYJ6+n+4+MvRqru+greySG533/7qWCXM+b7cmUEQkZIlLEZvcgDfbo7aY6k0ajQYFbCWdnr8aYYco6NixxVQm0qun12GgMzFfLt3rWifv6mYe8lF0okNU6jCJS/NV2ZEb4dtlKZyYOyXhObtMrNF4roPCd2gVjea1YtSme6EJN8cBC8BZmhMUEpwn9UiQ3skg+jyJjhBQ8II48r9JzpJa8eFdpvpTrPIMgJ6Bmudj1KnbOdy4gByWJgkJC9BNvAlnBwPtvBzXUOwKm/FwbzThOx41mWWxM+sIDrMHtaW6lBISBm8M+BAxggCZOAi3M38wogH7SCXwt5FGddauFzY3A2JL2cFx9ATR4Nb99o6J/uHvVLdq2wVsBZcSn81BkDuiFUBtGXhv5PR1tgk40AxUQ8UjOttViKYBNswuvXEMIKQXz8mZQ67qV8moVUAXYpNKyLpqncQyeNLOx1Zoej6Mu3Pt8wKlBgiEC0rC 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:(13230031)(36860700004)(376005)(82310400014); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2024 13:54:17.3634 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: dadacafe-06e1-4381-a194-08dc3d1bbff6 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: DU2PEPF0001E9C0.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR08MB10191 X-Spam-Status: No, score=-10.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE, 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: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: binutils-bounces+patchwork=sourceware.org@sourceware.org From 25d573b0e9b5b7e163f0cf0f72b64a1518445f94 Mon Sep 17 00:00:00 2001 From: Yury Khrustalev Date: Wed, 21 Feb 2024 12:52:23 +0000 Subject: [PATCH 1/2] aarch64: Add support for (M)ADDPT and (M)SUBPT instructions The following instructions are added in this patch: - ADDPT and SUBPT - Add/Subtract checked pointer - MADDPT and MSUBPT - Multiply Add/Subtract checked pointer These instructions are part of Checked Pointer Arithmetic extension. This patch adds assembler and disassembler support for these instructions with relevant checks. Tests are included as well. A new flag "+cpa" added to documentation. This flag enables CPA extension. Regression tested on the aarch64-none-linux-gnu target and no regressions have been found. --- gas/config/tc-aarch64.c | 47 ++++++++++++++++++++ gas/doc/c-aarch64.texi | 2 + gas/testsuite/gas/aarch64/cpa-addsub-bad.d | 4 ++ gas/testsuite/gas/aarch64/cpa-addsub-bad.l | 50 ++++++++++++++++++++++ gas/testsuite/gas/aarch64/cpa-addsub-bad.s | 29 +++++++++++++ gas/testsuite/gas/aarch64/cpa-addsub-neg.d | 5 +++ gas/testsuite/gas/aarch64/cpa-addsub-neg.l | 27 ++++++++++++ gas/testsuite/gas/aarch64/cpa-addsub.d | 39 +++++++++++++++++ gas/testsuite/gas/aarch64/cpa-addsub.s | 29 +++++++++++++ include/opcode/aarch64.h | 3 ++ opcodes/aarch64-asm.c | 15 +++++++ opcodes/aarch64-asm.h | 1 + opcodes/aarch64-dis.c | 17 ++++++++ opcodes/aarch64-dis.h | 1 + opcodes/aarch64-opc.c | 25 +++++++++++ opcodes/aarch64-tbl.h | 20 ++++++++- 16 files changed, 313 insertions(+), 1 deletion(-) create mode 100644 gas/testsuite/gas/aarch64/cpa-addsub-bad.d create mode 100644 gas/testsuite/gas/aarch64/cpa-addsub-bad.l create mode 100644 gas/testsuite/gas/aarch64/cpa-addsub-bad.s create mode 100644 gas/testsuite/gas/aarch64/cpa-addsub-neg.d create mode 100644 gas/testsuite/gas/aarch64/cpa-addsub-neg.l create mode 100644 gas/testsuite/gas/aarch64/cpa-addsub.d create mode 100644 gas/testsuite/gas/aarch64/cpa-addsub.s diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c index 4380de3f87b..d6dab86e8a9 100644 --- a/gas/config/tc-aarch64.c +++ b/gas/config/tc-aarch64.c @@ -3748,6 +3748,41 @@ parse_shifter_operand (char **str, aarch64_opnd_info *operand, return parse_shifter_operand_imm (str, operand, mode); } +static bool +parse_reg_lsl_shifter_operand (char **str, aarch64_opnd_info *operand) +{ + aarch64_opnd_qualifier_t qualifier; + const reg_entry *reg = aarch64_reg_parse_32_64 (str, &qualifier); + + if (reg) + { + if (!aarch64_check_reg_type (reg, REG_TYPE_R_ZR)) + { + set_expected_reg_error (REG_TYPE_R_ZR, reg, 0); + return false; + } + + operand->reg.regno = reg->number; + operand->qualifier = qualifier; + + /* Accept optional LSL shift operation on register. */ + if (!skip_past_comma (str)) + return true; + + if (!parse_shift (str, operand, SHIFTED_LSL)) + return false; + + return true; + } + else + { + set_syntax_error + (_("integer register expected in the shifted operand " + "register")); + return false; + } +} + /* Return TRUE on success; return FALSE otherwise. */ static bool @@ -6593,6 +6628,17 @@ parse_operands (char *str, const aarch64_opcode *opcode) } break; + case AARCH64_OPND_Rm_LSL: + po_misc_or_fail (parse_reg_lsl_shifter_operand (&str, info)); + if (!info->shifter.operator_present) + { + /* Default to LSL #0 if not present. */ + gas_assert (info->shifter.kind == AARCH64_MOD_NONE); + info->shifter.kind = AARCH64_MOD_LSL; + info->shifter.amount = 0; + } + break; + case AARCH64_OPND_Fd: case AARCH64_OPND_Fn: case AARCH64_OPND_Fm: @@ -10429,6 +10475,7 @@ static const struct aarch64_option_cpu_value_table aarch64_features[] = { {"sme2p1", AARCH64_FEATURE (SME2p1), AARCH64_FEATURE (SME2)}, {"sve2p1", AARCH64_FEATURE (SVE2p1), AARCH64_FEATURE (SVE2)}, {"rcpc3", AARCH64_FEATURE (RCPC3), AARCH64_FEATURE (RCPC2)}, + {"cpa", AARCH64_FEATURE (CPA), AARCH64_NO_FEATURES}, {NULL, AARCH64_NO_FEATURES, AARCH64_NO_FEATURES}, }; diff --git a/gas/doc/c-aarch64.texi b/gas/doc/c-aarch64.texi index 4f97768206c..3756948bfb8 100644 --- a/gas/doc/c-aarch64.texi +++ b/gas/doc/c-aarch64.texi @@ -289,6 +289,8 @@ automatically cause those extensions to be disabled. @tab Enable @code{wfet} and @code{wfit} instructions. @item @code{xs} @tab @tab Enable the XS memory attribute extension. +@item @code{cpa} @tab + @tab Enable the Checked Pointer Arithmetic extension. @end multitable @multitable @columnfractions .20 .80 diff --git a/gas/testsuite/gas/aarch64/cpa-addsub-bad.d b/gas/testsuite/gas/aarch64/cpa-addsub-bad.d new file mode 100644 index 00000000000..0fbcfe395e9 --- /dev/null +++ b/gas/testsuite/gas/aarch64/cpa-addsub-bad.d @@ -0,0 +1,4 @@ +#name: Incorrect input test for CPA instructions ((M)ADDPT and (M)SUBPT). +#as: -march=armv8-a+cpa +#source: cpa-addsub-bad.s +#error_output: cpa-addsub-bad.l diff --git a/gas/testsuite/gas/aarch64/cpa-addsub-bad.l b/gas/testsuite/gas/aarch64/cpa-addsub-bad.l new file mode 100644 index 00000000000..f5e8967662c --- /dev/null +++ b/gas/testsuite/gas/aarch64/cpa-addsub-bad.l @@ -0,0 +1,50 @@ +.*: Assembler messages: +.*: Error: operand mismatch -- `addpt w5,w8,w0' +.*: Info:\s+did you mean this\? +.*: Info:\s+addpt x5, x8, x0 +.*: Error: only 'LSL' shift is permitted at operand 3 -- `addpt x5,x8,x0,asr#6' +.*: Error: shift amount out of range 0 to 7 at operand 3 -- `addpt x5,x8,x0,lsl#9' +.*: Error: expected an integer or zero register at operand 3 -- `addpt x5,x8,sp,lsl#5' +.*: Error: expected an integer or stack pointer register at operand 1 -- `addpt xzr,x8,x0,lsl#3' + +.*: Error: operand mismatch -- `subpt w5,w8,w0' +.*: Info:\s+did you mean this\? +.*: Info:\s+subpt x5, x8, x0 +.*: Error: only 'LSL' shift is permitted at operand 3 -- `subpt x5,x8,x0,asr#6' +.*: Error: shift amount out of range 0 to 7 at operand 3 -- `subpt x5,x8,x0,lsl#9' +.*: Error: expected an integer or zero register at operand 3 -- `subpt x5,x8,sp,lsl#5' +.*: Error: expected an integer or stack pointer register at operand 1 -- `subpt xzr,x8,x0,lsl#3' + +.*: Error: operand mismatch -- `maddpt w1,x2,x3,x4' +.*: Info:\s+did you mean this\? +.*: Info:\s+maddpt x1, x2, x3, x4 +.*: Error: operand mismatch -- `maddpt x1,w2,x3,x4' +.*: Info:\s+did you mean this\? +.*: Info:\s+maddpt x1, x2, x3, x4 +.*: Error: operand mismatch -- `maddpt x1,x2,w3,x4' +.*: Info:\s+did you mean this\? +.*: Info:\s+maddpt x1, x2, x3, x4 +.*: Error: operand mismatch -- `maddpt x1,x2,x3,w4' +.*: Info:\s+did you mean this\? +.*: Info:\s+maddpt x1, x2, x3, x4 +.*: Error: expected an integer or zero register at operand 1 -- `maddpt sp,x2,x3,x4' +.*: Error: expected an integer or zero register at operand 2 -- `maddpt x1,sp,x3,x4' +.*: Error: expected an integer or zero register at operand 3 -- `maddpt x1,x2,sp,x4' +.*: Error: expected an integer or zero register at operand 4 -- `maddpt x1,x2,x3,sp' + +.*: Error: operand mismatch -- `msubpt w1,x2,x3,x4' +.*: Info:\s+did you mean this\? +.*: Info:\s+msubpt x1, x2, x3, x4 +.*: Error: operand mismatch -- `msubpt x1,w2,x3,x4' +.*: Info:\s+did you mean this\? +.*: Info:\s+msubpt x1, x2, x3, x4 +.*: Error: operand mismatch -- `msubpt x1,x2,w3,x4' +.*: Info:\s+did you mean this\? +.*: Info:\s+msubpt x1, x2, x3, x4 +.*: Error: operand mismatch -- `msubpt x1,x2,x3,w4' +.*: Info:\s+did you mean this\? +.*: Info:\s+msubpt x1, x2, x3, x4 +.*: Error: expected an integer or zero register at operand 1 -- `msubpt sp,x2,x3,x4' +.*: Error: expected an integer or zero register at operand 2 -- `msubpt x1,sp,x3,x4' +.*: Error: expected an integer or zero register at operand 3 -- `msubpt x1,x2,sp,x4' +.*: Error: expected an integer or zero register at operand 4 -- `msubpt x1,x2,x3,sp' diff --git a/gas/testsuite/gas/aarch64/cpa-addsub-bad.s b/gas/testsuite/gas/aarch64/cpa-addsub-bad.s new file mode 100644 index 00000000000..dec18c35139 --- /dev/null +++ b/gas/testsuite/gas/aarch64/cpa-addsub-bad.s @@ -0,0 +1,29 @@ +addpt w5, w8, w0 +addpt x5, x8, x0, asr #6 +addpt x5, x8, x0, lsl #9 +addpt x5, x8, sp, lsl #5 +addpt xzr, x8, x0, lsl #3 + +subpt w5, w8, w0 +subpt x5, x8, x0, asr #6 +subpt x5, x8, x0, lsl #9 +subpt x5, x8, sp, lsl #5 +subpt xzr, x8, x0, lsl #3 + +maddpt w1, x2, x3, x4 +maddpt x1, w2, x3, x4 +maddpt x1, x2, w3, x4 +maddpt x1, x2, x3, w4 +maddpt sp, x2, x3, x4 +maddpt x1, sp, x3, x4 +maddpt x1, x2, sp, x4 +maddpt x1, x2, x3, sp + +msubpt w1, x2, x3, x4 +msubpt x1, w2, x3, x4 +msubpt x1, x2, w3, x4 +msubpt x1, x2, x3, w4 +msubpt sp, x2, x3, x4 +msubpt x1, sp, x3, x4 +msubpt x1, x2, sp, x4 +msubpt x1, x2, x3, sp diff --git a/gas/testsuite/gas/aarch64/cpa-addsub-neg.d b/gas/testsuite/gas/aarch64/cpa-addsub-neg.d new file mode 100644 index 00000000000..0a1d1185dab --- /dev/null +++ b/gas/testsuite/gas/aarch64/cpa-addsub-neg.d @@ -0,0 +1,5 @@ +#name: Negative test for CPA instructions ((M)ADDPT and (M)SUBPT). +#as: -march=armv8-a +#as: -march=armv9-a +#source: cpa-addsub.s +#error_output: cpa-addsub-neg.l diff --git a/gas/testsuite/gas/aarch64/cpa-addsub-neg.l b/gas/testsuite/gas/aarch64/cpa-addsub-neg.l new file mode 100644 index 00000000000..44a7236f38f --- /dev/null +++ b/gas/testsuite/gas/aarch64/cpa-addsub-neg.l @@ -0,0 +1,27 @@ +.*: Assembler messages: +.*: Error: selected processor does not support `addpt x0,x0,x0' +.*: Error: selected processor does not support `addpt sp,x0,x0' +.*: Error: selected processor does not support `addpt x0,sp,x0' +.*: Error: selected processor does not support `addpt x0,x0,xzr' +.*: Error: selected processor does not support `addpt x0,x0,x0,lsl#0' +.*: Error: selected processor does not support `addpt x0,x0,x0,lsl#7' +.*: Error: selected processor does not support `addpt x8,x13,x29,lsl#5' +.*: Error: selected processor does not support `subpt x0,x0,x0' +.*: Error: selected processor does not support `subpt sp,x0,x0' +.*: Error: selected processor does not support `subpt x0,sp,x0' +.*: Error: selected processor does not support `subpt x0,x0,xzr' +.*: Error: selected processor does not support `subpt x0,x0,x0,lsl#0' +.*: Error: selected processor does not support `subpt x0,x0,x0,lsl#7' +.*: Error: selected processor does not support `subpt x1,x10,x22,lsl#2' +.*: Error: selected processor does not support `maddpt x0,x0,x0,x0' +.*: Error: selected processor does not support `maddpt xzr,x0,x0,x0' +.*: Error: selected processor does not support `maddpt x0,xzr,x0,x0' +.*: Error: selected processor does not support `maddpt x0,x0,xzr,x0' +.*: Error: selected processor does not support `maddpt x0,x0,x0,xzr' +.*: Error: selected processor does not support `maddpt x19,x10,x1,x28' +.*: Error: selected processor does not support `msubpt x0,x0,x0,x0' +.*: Error: selected processor does not support `msubpt xzr,x0,x0,x0' +.*: Error: selected processor does not support `msubpt x0,xzr,x0,x0' +.*: Error: selected processor does not support `msubpt x0,x0,xzr,x0' +.*: Error: selected processor does not support `msubpt x0,x0,x0,xzr' +.*: Error: selected processor does not support `msubpt x4,x13,x9,x21' diff --git a/gas/testsuite/gas/aarch64/cpa-addsub.d b/gas/testsuite/gas/aarch64/cpa-addsub.d new file mode 100644 index 00000000000..73e9ea28604 --- /dev/null +++ b/gas/testsuite/gas/aarch64/cpa-addsub.d @@ -0,0 +1,39 @@ +#name: Tests for CPA instructions ((M)ADDPT and (M)SUBPT). +#as: -march=armv8-a+cpa +#objdump: -dr + +[^:]+: file format .* + + +[^:]+: + +[^:]+: +.*: 9a002000 addpt x0, x0, x0 +.*: 9a00201f addpt sp, x0, x0 +.*: 9a0023e0 addpt x0, sp, x0 +.*: 9a1f2000 addpt x0, x0, xzr +.*: 9a002000 addpt x0, x0, x0 +.*: 9a003c00 addpt x0, x0, x0, lsl #7 +.*: 9a1d35a8 addpt x8, x13, x29, lsl #5 + +.*: da002000 subpt x0, x0, x0 +.*: da00201f subpt sp, x0, x0 +.*: da0023e0 subpt x0, sp, x0 +.*: da1f2000 subpt x0, x0, xzr +.*: da002000 subpt x0, x0, x0 +.*: da003c00 subpt x0, x0, x0, lsl #7 +.*: da162941 subpt x1, x10, x22, lsl #2 + +.*: 9b600000 maddpt x0, x0, x0, x0 +.*: 9b60001f maddpt xzr, x0, x0, x0 +.*: 9b6003e0 maddpt x0, xzr, x0, x0 +.*: 9b7f0000 maddpt x0, x0, xzr, x0 +.*: 9b607c00 maddpt x0, x0, x0, xzr +.*: 9b617153 maddpt x19, x10, x1, x28 + +.*: 9b608000 msubpt x0, x0, x0, x0 +.*: 9b60801f msubpt xzr, x0, x0, x0 +.*: 9b6083e0 msubpt x0, xzr, x0, x0 +.*: 9b7f8000 msubpt x0, x0, xzr, x0 +.*: 9b60fc00 msubpt x0, x0, x0, xzr +.*: 9b69d5a4 msubpt x4, x13, x9, x21 diff --git a/gas/testsuite/gas/aarch64/cpa-addsub.s b/gas/testsuite/gas/aarch64/cpa-addsub.s new file mode 100644 index 00000000000..8d64dd8dc62 --- /dev/null +++ b/gas/testsuite/gas/aarch64/cpa-addsub.s @@ -0,0 +1,29 @@ +addpt x0, x0, x0 +addpt sp, x0, x0 +addpt x0, sp, x0 +addpt x0, x0, xzr +addpt x0, x0, x0, lsl #0 +addpt x0, x0, x0, lsl #7 +addpt x8, x13, x29, lsl #5 + +subpt x0, x0, x0 +subpt sp, x0, x0 +subpt x0, sp, x0 +subpt x0, x0, xzr +subpt x0, x0, x0, lsl #0 +subpt x0, x0, x0, lsl #7 +subpt x1, x10, x22, lsl #2 + +maddpt x0, x0, x0, x0 +maddpt xzr, x0, x0, x0 +maddpt x0, xzr, x0, x0 +maddpt x0, x0, xzr, x0 +maddpt x0, x0, x0, xzr +maddpt x19, x10, x1, x28 + +msubpt x0, x0, x0, x0 +msubpt xzr, x0, x0, x0 +msubpt x0, xzr, x0, x0 +msubpt x0, x0, xzr, x0 +msubpt x0, x0, x0, xzr +msubpt x4, x13, x9, x21 diff --git a/include/opcode/aarch64.h b/include/opcode/aarch64.h index f585265aa62..1e134a61b80 100644 --- a/include/opcode/aarch64.h +++ b/include/opcode/aarch64.h @@ -228,6 +228,8 @@ enum aarch64_feature_bit { AARCH64_FEATURE_SVE2p1, /* RCPC3 instructions. */ AARCH64_FEATURE_RCPC3, + /* Checked Pointer Arithmetic instructions. */ + AARCH64_FEATURE_CPA, AARCH64_NUM_FEATURES }; @@ -490,6 +492,7 @@ enum aarch64_opnd AARCH64_OPND_PAIRREG_OR_XZR, /* Paired register operand, optionally xzr. */ AARCH64_OPND_Rm_EXT, /* Integer Rm extended. */ AARCH64_OPND_Rm_SFT, /* Integer Rm shifted. */ + AARCH64_OPND_Rm_LSL, /* Integer Rm shifted (LSL-only). */ AARCH64_OPND_Fd, /* Floating-point Fd. */ AARCH64_OPND_Fn, /* Floating-point Fn. */ diff --git a/opcodes/aarch64-asm.c b/opcodes/aarch64-asm.c index 29e96e244bb..5a55ca2f86d 100644 --- a/opcodes/aarch64-asm.c +++ b/opcodes/aarch64-asm.c @@ -1020,6 +1020,21 @@ aarch64_ins_reg_shifted (const aarch64_operand *self ATTRIBUTE_UNUSED, return true; } +/* Encode the LSL-shifted register operand for e.g. + ADDPT , , {, LSL #}. */ +bool +aarch64_ins_reg_lsl_shifted (const aarch64_operand *self ATTRIBUTE_UNUSED, + const aarch64_opnd_info *info, aarch64_insn *code, + const aarch64_inst *inst ATTRIBUTE_UNUSED, + aarch64_operand_error *errors ATTRIBUTE_UNUSED) +{ + /* Rm */ + insert_field (FLD_Rm, code, info->reg.regno, 0); + /* imm3 */ + insert_field (FLD_imm3_10, code, info->shifter.amount, 0); + return true; +} + /* Encode an SVE address [, #*, MUL VL], where is a 4-bit signed value and where is 1 plus SELF's operand-dependent value. fields[0] specifies the field that diff --git a/opcodes/aarch64-asm.h b/opcodes/aarch64-asm.h index c6dde1c4d1b..88e389bfebd 100644 --- a/opcodes/aarch64-asm.h +++ b/opcodes/aarch64-asm.h @@ -75,6 +75,7 @@ AARCH64_DECL_OPD_INSERTER (ins_hint); AARCH64_DECL_OPD_INSERTER (ins_prfop); AARCH64_DECL_OPD_INSERTER (ins_reg_extended); AARCH64_DECL_OPD_INSERTER (ins_reg_shifted); +AARCH64_DECL_OPD_INSERTER (ins_reg_lsl_shifted); AARCH64_DECL_OPD_INSERTER (ins_sve_addr_ri_s4); AARCH64_DECL_OPD_INSERTER (ins_sve_addr_ri_s4xvl); AARCH64_DECL_OPD_INSERTER (ins_sve_addr_ri_s6xvl); diff --git a/opcodes/aarch64-dis.c b/opcodes/aarch64-dis.c index 82d2f8f8251..96f42ae862a 100644 --- a/opcodes/aarch64-dis.c +++ b/opcodes/aarch64-dis.c @@ -1526,6 +1526,23 @@ aarch64_ext_reg_shifted (const aarch64_operand *self ATTRIBUTE_UNUSED, return true; } +/* Decode the LSL-shifted register operand for e.g. + ADDPT , , {, LSL #}. */ +bool +aarch64_ext_reg_lsl_shifted (const aarch64_operand *self ATTRIBUTE_UNUSED, + aarch64_opnd_info *info, + aarch64_insn code, + const aarch64_inst *inst ATTRIBUTE_UNUSED, + aarch64_operand_error *errors ATTRIBUTE_UNUSED) +{ + /* Rm */ + info->reg.regno = extract_field (FLD_Rm, code, 0); + /* imm3 */ + info->shifter.kind = AARCH64_MOD_LSL; + info->shifter.amount = extract_field (FLD_imm3_10, code, 0); + return true; +} + /* Decode an SVE address [, #*, MUL VL], where is given by the OFFSET parameter and where is 1 plus SELF's operand-dependent value. fields[0] specifies the field diff --git a/opcodes/aarch64-dis.h b/opcodes/aarch64-dis.h index 6ed6776b679..86494cc3093 100644 --- a/opcodes/aarch64-dis.h +++ b/opcodes/aarch64-dis.h @@ -99,6 +99,7 @@ AARCH64_DECL_OPD_EXTRACTOR (ext_hint); AARCH64_DECL_OPD_EXTRACTOR (ext_prfop); AARCH64_DECL_OPD_EXTRACTOR (ext_reg_extended); AARCH64_DECL_OPD_EXTRACTOR (ext_reg_shifted); +AARCH64_DECL_OPD_EXTRACTOR (ext_reg_lsl_shifted); AARCH64_DECL_OPD_EXTRACTOR (ext_sve_addr_ri_s4); AARCH64_DECL_OPD_EXTRACTOR (ext_sve_addr_ri_s4xvl); AARCH64_DECL_OPD_EXTRACTOR (ext_sve_addr_ri_s6xvl); diff --git a/opcodes/aarch64-opc.c b/opcodes/aarch64-opc.c index 965c1c0698c..e88c616f4a9 100644 --- a/opcodes/aarch64-opc.c +++ b/opcodes/aarch64-opc.c @@ -3270,6 +3270,17 @@ operand_general_constraint_met_p (const aarch64_opnd_info *opnds, int idx, } break; + case AARCH64_OPND_Rm_LSL: + /* We expect here that opnd->shifter.kind != AARCH64_MOD_LSL + because the parser already restricts the type of shift to LSL only, + so another check of shift kind would be redundant. */ + if (!value_in_range_p (opnd->shifter.amount, 0, 7)) + { + set_sft_amount_out_of_range_error (mismatch_detail, idx, 0, 7); + return 0; + } + break; + default: break; } @@ -4005,6 +4016,20 @@ aarch64_print_operand (char *buf, size_t size, bfd_vma pc, style_imm (styler, "#%" PRIi64, opnd->shifter.amount)); break; + case AARCH64_OPND_Rm_LSL: + assert (opnd->qualifier == AARCH64_OPND_QLF_X); + assert (opnd->shifter.kind == AARCH64_MOD_LSL); + if (opnd->shifter.amount == 0) + snprintf (buf, size, "%s", + style_reg (styler, get_int_reg_name (opnd->reg.regno, + opnd->qualifier, 0))); + else + snprintf (buf, size, "%s, %s %s", + style_reg (styler, get_int_reg_name (opnd->reg.regno, opnd->qualifier, 0)), + style_sub_mnem (styler, aarch64_operand_modifiers[opnd->shifter.kind].name), + style_imm (styler, "#%" PRIi64, opnd->shifter.amount)); + break; + case AARCH64_OPND_Fd: case AARCH64_OPND_Fn: case AARCH64_OPND_Fm: diff --git a/opcodes/aarch64-tbl.h b/opcodes/aarch64-tbl.h index 0f84832523e..7232d6a9f35 100644 --- a/opcodes/aarch64-tbl.h +++ b/opcodes/aarch64-tbl.h @@ -240,6 +240,12 @@ QLF4(X,X,X,X), \ } +/* e.g. MADDPT , , , . */ +#define QL_I4SAMEX \ +{ \ + QLF4(X,X,X,X), \ +} + /* e.g. SMADDL , , , . */ #define QL_I3SAMEL \ { \ @@ -2649,7 +2655,8 @@ static const aarch64_feature_set aarch64_feature_sve2p1 = AARCH64_FEATURE (SVE2p1); static const aarch64_feature_set aarch64_feature_rcpc3 = AARCH64_FEATURE (RCPC3); - +static const aarch64_feature_set aarch64_feature_cpa = + AARCH64_FEATURE (CPA); #define CORE &aarch64_feature_v8 #define FP &aarch64_feature_fp @@ -2716,6 +2723,7 @@ static const aarch64_feature_set aarch64_feature_rcpc3 = #define SME2p1 &aarch64_feature_sme2p1 #define SVE2p1 &aarch64_feature_sve2p1 #define RCPC3 &aarch64_feature_rcpc3 +#define CPA &aarch64_feature_cpa #define CORE_INSN(NAME,OPCODE,MASK,CLASS,OP,OPS,QUALS,FLAGS) \ { NAME, OPCODE, MASK, CLASS, OP, CORE, OPS, QUALS, FLAGS, 0, 0, NULL } @@ -2888,6 +2896,8 @@ static const aarch64_feature_set aarch64_feature_rcpc3 = { NAME, OPCODE, MASK, the, 0, D128_THE, OPS, QUALS, FLAGS, 0, 0, NULL } #define RCPC3_INSN(NAME,OPCODE,MASK,CLASS,OPS,QUALS,FLAGS) \ { NAME, OPCODE, MASK, CLASS, 0, RCPC3, OPS, QUALS, FLAGS, 0, 0, NULL } +#define CPA_INSN(NAME,OPCODE,MASK,CLASS,OPS,QUALS) \ + { NAME, OPCODE, MASK, CLASS, 0, CPA, OPS, QUALS, 0, 0, 0, NULL } #define MOPS_CPY_OP1_OP2_PME_INSN(NAME, OPCODE, MASK, FLAGS, CONSTRAINTS) \ MOPS_INSN (NAME, OPCODE, MASK, 0, \ @@ -6392,6 +6402,12 @@ const struct aarch64_opcode aarch64_opcode_table[] = SVE2p1_INSNC("st3q",0xe4a00000, 0xffe0e000, sve_misc, 0, OP3 (SME_Zt3, SVE_Pg3, SVE_ADDR_RR_LSL4), OP_SVE_QUU, 0, C_SCAN_MOVPRFX, 0), SVE2p1_INSNC("st4q",0xe4e00000, 0xffe0e000, sve_misc, 0, OP3 (SME_Zt4, SVE_Pg3, SVE_ADDR_RR_LSL4), OP_SVE_QUU, 0, C_SCAN_MOVPRFX, 0), +/* Checked Pointer Arithmetic Instructions. */ + CPA_INSN ("addpt", 0x9a002000, 0xffe0e000, aarch64_misc, OP3 (Rd_SP, Rn_SP, Rm_LSL), QL_I3SAMEX), + CPA_INSN ("subpt", 0xda002000, 0xffe0e000, aarch64_misc, OP3 (Rd_SP, Rn_SP, Rm_LSL), QL_I3SAMEX), + CPA_INSN ("maddpt", 0x9b600000, 0xffe08000, aarch64_misc, OP4 (Rd, Rn, Rm, Ra), QL_I4SAMEX), + CPA_INSN ("msubpt", 0x9b608000, 0xffe08000, aarch64_misc, OP4 (Rd, Rn, Rm, Ra), QL_I4SAMEX), + {0, 0, 0, 0, 0, 0, {}, {}, 0, 0, 0, NULL}, }; @@ -6440,6 +6456,8 @@ const struct aarch64_opcode aarch64_opcode_table[] = "an integer register with optional extension") \ Y(MODIFIED_REG, reg_shifted, "Rm_SFT", 0, F(), \ "an integer register with optional shift") \ + Y(MODIFIED_REG, reg_lsl_shifted, "Rm_LSL", 0, F(), \ + "an integer register with optional LSL shift") \ Y(FP_REG, regno, "Fd", 0, F(FLD_Rd), "a floating-point register") \ Y(FP_REG, regno, "Fn", 0, F(FLD_Rn), "a floating-point register") \ Y(FP_REG, regno, "Fm", 0, F(FLD_Rm), "a floating-point register") \ From patchwork Tue Mar 5 13:54:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yury Khrustalev X-Patchwork-Id: 86798 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AB97B385843A for ; Tue, 5 Mar 2024 13:55:18 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2060.outbound.protection.outlook.com [40.107.21.60]) by sourceware.org (Postfix) with ESMTPS id 644B3385840A for ; Tue, 5 Mar 2024 13:54:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 644B3385840A 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 644B3385840A Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.21.60 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1709646887; cv=pass; b=v9nEYWNIxOC5HlPTpyyrxuOxFDVh1bTi0Ii5Hrqi8rKRT42gUgi0S5e4gg4iVFC0byl0aLsxrvEFCZoMATAZvBYgeoB1/DOPfjv3IdLZscEOe6dJI7FYxmwVd2lUEwJfmynRvTJCIOL6Ygz+IE/JV9R8T8ya897BG+wx0WFgpjU= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1709646887; c=relaxed/simple; bh=Y0ZzDB2bhV781I1KmZERgovRKnRSj3YiSs7PR6dQeWw=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=srFJL1bD2hcCPlaJwafhjEM5QCDBF4CTmHm0Nt7uOYUCAt/ltBKwq8LnbCGVN2jWo6WZoiv4XkpqcJmxkVc7kw+zWpa/dKjOG4ak9RcxwiOJFtq8O1DZMY/rs3RvP31bT3kY/YSgN4kTO2grIuUInagyz9fXWUaWcHW6B/qy/XA= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=hDQmDGAmTSVsineoyAGpxhRzEpFbwTIdwKy2fseG1I/GVjjp41m2os7rieXYJuMqpozUl7SAIXOZ0IK0LxxuQfFRJ/Tpp4mPeRdm4Hlo5YFvSr+f2zNx9/aAkEihPM+erhWxViKMWXOjZv1OUwAA56vr339S9nUpytxaARuswZREDJA/l3w+CXh0IsE8vCXQMw4mFdMM1rzcklKaWAonbulkdUmDwu5q1ZUSAkTFcuZXTAlhv+y5PuzCMN6rVRq/V4EzguwSZROgCubTwsEg6wCB2o4TK95n6gtsPnoAPPqwzo8AXVthvWIY9MtXfpPWzYyVQitVdLL/Ct4e6Q7d6A== ARC-Message-Signature: i=2; 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=uG8mJkU221P9IvmI0vqGgydophedzx9q7nIBF5PeZn8=; b=Ou7KPXQbDhpwjLOwrbWuV6x9bbwzxRleeWbJu+nQPPdbAx/d5MKoCLRemIykFwcrK8Gz+1kaL74XhWMxBlLoV1mkkjgukYcURESyEYmIDvJT1lFst+gXZReLlp3IWL6hXVtLzzb1EiYf9x+T6xUVYVZBOJPHFpkA/IY4o2KHVbmhdko/kshS6Py/5IHVMbNc4rScz9ZhKgz/pUs5vVXbdvH+IXQ+RtDgCIts0Lw3UGr19awPgaenVXdozp0sXZU/MNQg80x8b0QmcPD0y1vBY8n9WMpcDd5kXrULKylv5oltEQuEvzH/4PlS/hjaCqs9wJr6pMVBF0bXagQ32oqIUA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=sourceware.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=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=uG8mJkU221P9IvmI0vqGgydophedzx9q7nIBF5PeZn8=; b=1nQdKa7Nfu6jNH+IBwazl69KpVTs4+RnmsfHgK0IS6Q8RyPtVJRGB/mpHYjIDwXv3RoNrvbD3rObQpj0012RfYukQd5bdpqQ8KFBnh0/pJLLGVBLPh8LmlnxNaf5nLl99dbqSEeaFrL+DW5S1bkrBMzRnizDbwlAZZSoM9TaIkk= Received: from AM4PR07CA0018.eurprd07.prod.outlook.com (2603:10a6:205:1::31) by PAXPR08MB7598.eurprd08.prod.outlook.com (2603:10a6:102:23d::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.38; Tue, 5 Mar 2024 13:54:39 +0000 Received: from AMS0EPF000001AF.eurprd05.prod.outlook.com (2603:10a6:205:1:cafe::3e) by AM4PR07CA0018.outlook.office365.com (2603:10a6:205:1::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.31 via Frontend Transport; Tue, 5 Mar 2024 13:54:39 +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=armh.onmicrosoft.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 AMS0EPF000001AF.mail.protection.outlook.com (10.167.16.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.11 via Frontend Transport; Tue, 5 Mar 2024 13:54:39 +0000 Received: ("Tessian outbound 3b68a75ac28e:v276"); Tue, 05 Mar 2024 13:54:38 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 10ee43d472793a85 X-CR-MTA-TID: 64aa7808 Received: from 233011275e9b.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id FA0282AA-98B0-4CDE-9935-E71DC2084A8C.1; Tue, 05 Mar 2024 13:54:32 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 233011275e9b.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 05 Mar 2024 13:54:32 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KZULPOquQBBnWFksx1wfQuwVsnO7rNcbdNFEuC16ZPr5/8VeaNflIgBV1I9Gi2K5ooodyveE2X8LBF1hpbNb6sHuV3YGrzn8iXQ6iS1NYuBUfpaDl8rfG+48cRWmcUnd8aA8gnUFUUdkJaDjMFsbIZwbI5iMhFJnsHZkVwhUSe71Z1h6JWcWcEoqHboW5SRVXsa7P3vn8GqapNY5FWuiRR0n0BIp3oLJtEJXAcV0nDzndakUp5t4aHsk2r8LfUO3HhRYvjwJR0/PG1DTJr2gK+ixPmrsQ2w/BrlrAFpdN6MjxpqC/cX3pmd4yCFcQWwfsFpHyTnqVNrGQ5KN6qssLg== 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=uG8mJkU221P9IvmI0vqGgydophedzx9q7nIBF5PeZn8=; b=kPRtGLzcFO2AcIWrh+a3Hxnm/8hpiKMuyiTVRsvNmeZJZdN7W6eKH8q/kh8TguLlIBKa5FpgHbocVekBtfBstZ7JloVayWBGFCsJlrNVlRN/qGM/J8ZpdwNrGgoGxeaEk/uutpj1n39MCNL0XuQUGpGhi9g2pyZ92zVlg27rcMKbaEmXbMDuSm+7sNs76Ww1xAouT1NR9pPbBrQXtbbAM42OAJdAR6Y7KIBmf8tJRRo0eLs+hpMTBSGXYWY7wClLTOad4NXVJmHR7cgyL6ZK/bWWGc6vSpv9uts5vBcFuPf2mQ3G6UN3KNAZpzKUBMj5c1wqnoRbEpXVKirdlYIPlg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=uG8mJkU221P9IvmI0vqGgydophedzx9q7nIBF5PeZn8=; b=1nQdKa7Nfu6jNH+IBwazl69KpVTs4+RnmsfHgK0IS6Q8RyPtVJRGB/mpHYjIDwXv3RoNrvbD3rObQpj0012RfYukQd5bdpqQ8KFBnh0/pJLLGVBLPh8LmlnxNaf5nLl99dbqSEeaFrL+DW5S1bkrBMzRnizDbwlAZZSoM9TaIkk= Received: from VI1PR08MB2989.eurprd08.prod.outlook.com (2603:10a6:803:4d::31) by AS8PR08MB6294.eurprd08.prod.outlook.com (2603:10a6:20b:29a::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39; Tue, 5 Mar 2024 13:54:30 +0000 Received: from VI1PR08MB2989.eurprd08.prod.outlook.com ([fe80::663f:ad99:85a2:b79]) by VI1PR08MB2989.eurprd08.prod.outlook.com ([fe80::663f:ad99:85a2:b79%7]) with mapi id 15.20.7339.035; Tue, 5 Mar 2024 13:54:30 +0000 From: Yury Khrustalev To: "binutils@sourceware.org" CC: Richard Earnshaw , "nickc@redhat.com" Subject: [PATCH 2/2] aarch64: Add support for SVE ADDPT, SUBPT, MADPT, MLAPT instructions Thread-Topic: [PATCH 2/2] aarch64: Add support for SVE ADDPT, SUBPT, MADPT, MLAPT instructions Thread-Index: AQHabwSkU2ytKFcMCU62Ve7WONgghA== Date: Tue, 5 Mar 2024 13:54:29 +0000 Message-ID: References: <4A36B5D7-1175-47DF-97CD-DA49D77842ED@arm.com> In-Reply-To: <4A36B5D7-1175-47DF-97CD-DA49D77842ED@arm.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: Apple Mail (2.3774.400.31) Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; x-ms-traffictypediagnostic: VI1PR08MB2989:EE_|AS8PR08MB6294:EE_|AMS0EPF000001AF:EE_|PAXPR08MB7598:EE_ X-MS-Office365-Filtering-Correlation-Id: ce209c20-d930-42a8-e1ed-08dc3d1bccfb x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr x-checkrecipientrouted: true nodisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: AgKeCmn4lx3dN14ldEsCV50XQ5uW0xg40+JuznK4s+M65Alb+1Awu4izG93/CpkgmmiX0cLloJ1jssQfHIxF5xSAPqkM01+NbSiNwcc9jWM1OghMthcUJqQc5FlvcIPHFptn6AdKT1b2rHVvn5QwT/yzlCD2QywOirrBWJZYULiPRo1GZrrbysADvc0LvO8316Xhug2TNQpmbASg7ILbiebo3SvvMrYzpbQqDhWaOyp009bzkmgcaXOBE8+kw9dArPnYleyL+2t/rujrSE31Sba0tNjrdGOZwXvAkEY5aZD9tOOk4HidiYwMMJcc5yrS89UqRn81yutDEuk1avq00qjVdGdIURcDk1VOQ+CwJXK1zF8bQjF/x6M472rxAUVTzL+kJQ8Nu53FfFugk+a3p3g408RwK8pl3A7Cn/waBOwtbzx1cBKZjRJ3E8SPRgLOs7x5TuUlQVKDchCBXwW96hditZ0wNjdCX9BpQUrXBljk8yxb+gVx0f3zRn3XglDa2Z9MId7Pzpcz5nZNRjiMPctemqFOCwyYvcQtiFmwIZL8iCdilGQZJAgmO74TRO7lQ0wU4/xPctHYIkT9lwvA0di+/ofiUfFsKj0O/jvTp5zhsq7hXLPJ+vGBBidAhl+2vesrNpB0z4L5hWKFrJ9227XuHvSj47NcNSDDpzkDetLj9FGiH3vY/v8BazdqigYF90HxMmg6irylzPtwrUkOQg== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR08MB2989.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005)(38070700009); DIR:OUT; SFP:1101; Content-ID: <0875CC636B7AD64990545B22C70004F5@eurprd08.prod.outlook.com> MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6294 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AMS0EPF000001AF.eurprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 3d9d8d26-ba06-4f2a-ecbe-08dc3d1bc774 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: he21suZ3zr+xIy9AcDgX4I/Bj2QookFceamn0PabYYok7/fhoIbYb3qAG8w1EQmV93JWNfh3YS2gcUiL0cqWtqwWUzaBXe3Xb9gzvgI/xWJjIxQjEkGN53Xh9p75c3RY+R9L9fR3gNPhCQkAF42ynF0Td0OH36Pq+66WBeFJkl+cfLUeKG86D5GfZGWN/8RTwOUxGUPu3KelSWGBC/pAnNHVqbYimSATWp65/hW5qrQOx83z5k1UlpFNLjWWts8hBH9NDNmd5vcv3rzO8HKjqYFGpFAZ1+UiZEqcmxOQYFm12QCKhVB5OLVAWO8Ncfj8F5QJq1P4WqL0lkWJbQjgr2pOlaFfkwK3lZ4BIiona9sBXt9OBzf1WeIT4kg98GBUXqcYoOcXqLNY+HhVOOhLB3JJvMqOfPB65cmzDi78hf8akZvJ22iaczSIU1icHiar8YPeVOFtK75SpMpxWCcwzkHhduuUwARCYzXSc1sMsLkcJ/EmGBRVs3U1VbVqyikMdpucXsK9C/xyLjWffpJxum2qwGMnhm4RX/kB/eeWF0jQkcSUBvnVHkUWVwbWCZZLTCpzi7o5zg9AbRb/2HJyaJqyVrYHfVzayTy0UUQarPxFiEmJHeQJXM5lQh+xr6osgMGgewdud/uYHlngzZaUsajAJqNs3A1Hkwig/T1tj0w1AQYIPE0pXoSa1b+O06joyvfr8hxQ1NXYBrxziR/Gd4/bNetdKW4AUIlTH2MUw70S/HvsnkegRE4QOcIKsbYz 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:(13230031)(36860700004)(376005)(82310400014); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2024 13:54:39.1457 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ce209c20-d930-42a8-e1ed-08dc3d1bccfb 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: AMS0EPF000001AF.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR08MB7598 X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE, 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: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: binutils-bounces+patchwork=sourceware.org@sourceware.org From 0bc43890ea8e76a8d0a652a4591abfac2c90c7a3 Mon Sep 17 00:00:00 2001 From: Yury Khrustalev Date: Mon, 26 Feb 2024 13:43:48 +0000 Subject: [PATCH 2/2] aarch64: Add support for SVE ADDPT, SUBPT, MADPT, MLAPT instructions The following instructions are added in this patch: - ADDPT (predicated): Add checked pointer vectors (predicated). - ADDPT (unpredicated): Add checked pointer vectors (unpredicated). - SUBPT (predicated): Subtract checked pointer vectors (predicated). - SUBPT (unpredicated): Subtract checked pointer vectors (unpredicated). - MADPT: Multiply-add checked pointer vectors, writing multiplicand - MLAPT: Multiply-add checked pointer vectors, writing addend These instructions are part of Checked Pointer Arithmetic extension and are enabled when both CPA and SVE are enabled. To achieve this, both flag "+sve" and "+cpa" should be active. This patch adds assembler and disassembler support for these instructions with relevant checks. Tests are included as well. Regression tested on the aarch64-none-linux-gnu target and no regressions have been found. --- gas/testsuite/gas/aarch64/cpa-addsub-bad.l | 4 +- gas/testsuite/gas/aarch64/cpa-sve-bad.d | 4 + gas/testsuite/gas/aarch64/cpa-sve-bad.l | 92 ++++++++++++++++++++++ gas/testsuite/gas/aarch64/cpa-sve-bad.s | 67 ++++++++++++++++ gas/testsuite/gas/aarch64/cpa-sve-neg.d | 7 ++ gas/testsuite/gas/aarch64/cpa-sve-neg.l | 7 ++ gas/testsuite/gas/aarch64/cpa-sve-neg.s | 6 ++ gas/testsuite/gas/aarch64/cpa-sve.d | 66 ++++++++++++++++ gas/testsuite/gas/aarch64/cpa-sve.s | 60 ++++++++++++++ opcodes/aarch64-tbl.h | 18 +++++ 10 files changed, 329 insertions(+), 2 deletions(-) create mode 100644 gas/testsuite/gas/aarch64/cpa-sve-bad.d create mode 100644 gas/testsuite/gas/aarch64/cpa-sve-bad.l create mode 100644 gas/testsuite/gas/aarch64/cpa-sve-bad.s create mode 100644 gas/testsuite/gas/aarch64/cpa-sve-neg.d create mode 100644 gas/testsuite/gas/aarch64/cpa-sve-neg.l create mode 100644 gas/testsuite/gas/aarch64/cpa-sve-neg.s create mode 100644 gas/testsuite/gas/aarch64/cpa-sve.d create mode 100644 gas/testsuite/gas/aarch64/cpa-sve.s diff --git a/gas/testsuite/gas/aarch64/cpa-addsub-bad.l b/gas/testsuite/gas/aarch64/cpa-addsub-bad.l index f5e8967662c..c0c671bbfdf 100644 --- a/gas/testsuite/gas/aarch64/cpa-addsub-bad.l +++ b/gas/testsuite/gas/aarch64/cpa-addsub-bad.l @@ -5,7 +5,7 @@ .*: Error: only 'LSL' shift is permitted at operand 3 -- `addpt x5,x8,x0,asr#6' .*: Error: shift amount out of range 0 to 7 at operand 3 -- `addpt x5,x8,x0,lsl#9' .*: Error: expected an integer or zero register at operand 3 -- `addpt x5,x8,sp,lsl#5' -.*: Error: expected an integer or stack pointer register at operand 1 -- `addpt xzr,x8,x0,lsl#3' +.*: Error: unexpected register type at operand 1 -- `addpt xzr,x8,x0,lsl#3' .*: Error: operand mismatch -- `subpt w5,w8,w0' .*: Info:\s+did you mean this\? @@ -13,7 +13,7 @@ .*: Error: only 'LSL' shift is permitted at operand 3 -- `subpt x5,x8,x0,asr#6' .*: Error: shift amount out of range 0 to 7 at operand 3 -- `subpt x5,x8,x0,lsl#9' .*: Error: expected an integer or zero register at operand 3 -- `subpt x5,x8,sp,lsl#5' -.*: Error: expected an integer or stack pointer register at operand 1 -- `subpt xzr,x8,x0,lsl#3' +.*: Error: unexpected register type at operand 1 -- `subpt xzr,x8,x0,lsl#3' .*: Error: operand mismatch -- `maddpt w1,x2,x3,x4' .*: Info:\s+did you mean this\? diff --git a/gas/testsuite/gas/aarch64/cpa-sve-bad.d b/gas/testsuite/gas/aarch64/cpa-sve-bad.d new file mode 100644 index 00000000000..0abecd55ca5 --- /dev/null +++ b/gas/testsuite/gas/aarch64/cpa-sve-bad.d @@ -0,0 +1,4 @@ +#name: Incorrect input test for CPA+SVE instructions. +#as: -march=armv8-a+sve+cpa +#source: cpa-sve-bad.s +#error_output: cpa-sve-bad.l diff --git a/gas/testsuite/gas/aarch64/cpa-sve-bad.l b/gas/testsuite/gas/aarch64/cpa-sve-bad.l new file mode 100644 index 00000000000..d7e3250d463 --- /dev/null +++ b/gas/testsuite/gas/aarch64/cpa-sve-bad.l @@ -0,0 +1,92 @@ +.*: Assembler messages: + +.*: Error: operand mismatch -- `addpt z0.b,p0/m,z0.b,z0.b' +.*: Info:\s+did you mean this\? +.*: Info:\s+addpt z0.d, p0/m, z0.d, z0.d +.*: Error: operand 3 must be the same register as operand 1 -- `addpt z0.d,p0/m,z1.d,z0.d' +.*: Error: operand mismatch -- `addpt z0.d,p0/m,z0.d,z0.s' +.*: Info:\s+did you mean this\? +.*: Info:\s+addpt z0.d, p0/m, z0.d, z0.d +.*: Error: operand mismatch -- `addpt z0.h,p0/m,z0.h,z0.d' +.*: Info:\s+did you mean this\? +.*: Info:\s+addpt z0.d, p0/m, z0.d, z0.d +.*: Error: expected an integer or stack pointer register at operand 2 -- `addpt x1,p0/m,z0.d,z0.d' +.*: Error: expected an SVE vector or predicate register at operand 2 -- `addpt z0.d,x1,z0.d,z0.d' +.*: Error: expected an SVE vector register at operand 3 -- `addpt z0.d,p0/m,x1,z0.d' +.*: Error: expected an SVE vector register at operand 4 -- `addpt z0.d,p0/m,z0.d,x1' + +.*: Error: operand mismatch -- `subpt z0.b,p0/m,z0.b,z0.b' +.*: Info:\s+did you mean this\? +.*: Info:\s+subpt z0.d, p0/m, z0.d, z0.d +.*: Error: operand 3 must be the same register as operand 1 -- `subpt z0.d,p0/m,z1.d,z0.d' +.*: Error: operand mismatch -- `subpt z0.d,p0/m,z0.d,z0.s' +.*: Info:\s+did you mean this\? +.*: Info:\s+subpt z0.d, p0/m, z0.d, z0.d +.*: Error: operand mismatch -- `subpt z0.h,p0/m,z0.h,z0.d' +.*: Info:\s+did you mean this\? +.*: Info:\s+subpt z0.d, p0/m, z0.d, z0.d +.*: Error: expected an integer or stack pointer register at operand 2 -- `subpt x1,p0/m,z0.d,z0.d' +.*: Error: expected an SVE vector or predicate register at operand 2 -- `subpt z0.d,x1,z0.d,z0.d' +.*: Error: expected an SVE vector register at operand 3 -- `subpt z0.d,p0/m,x1,z0.d' +.*: Error: expected an SVE vector register at operand 4 -- `subpt z0.d,p0/m,z0.d,x1' + +.*: Error: operand mismatch -- `addpt z0.b,z0.b,z0.b' +.*: Info:\s+did you mean this\? +.*: Info:\s+addpt z0.d, z0.d, z0.d +.*: Error: operand mismatch -- `addpt z0.h,z0.h,z0.h' +.*: Info:\s+did you mean this\? +.*: Info:\s+addpt z0.d, z0.d, z0.d +.*: Error: operand mismatch -- `addpt z0.s,z0.s,z0.s' +.*: Info:\s+did you mean this\? +.*: Info:\s+addpt z0.d, z0.d, z0.d +.*: Error: expected an integer or stack pointer register at operand 2 -- `addpt x15,z0.d,z0.d' +.*: Error: expected an SVE vector or predicate register at operand 2 -- `addpt z0.d,x15,z0.d' +.*: Error: expected an SVE vector register at operand 3 -- `addpt z0.d,z0.d,x15' + +.*: Error: operand mismatch -- `subpt z0.b,z0.b,z0.b' +.*: Info:\s+did you mean this\? +.*: Info:\s+subpt z0.d, z0.d, z0.d +.*: Error: operand mismatch -- `subpt z0.h,z0.h,z0.h' +.*: Info:\s+did you mean this\? +.*: Info:\s+subpt z0.d, z0.d, z0.d +.*: Error: operand mismatch -- `subpt z0.s,z0.s,z0.s' +.*: Info:\s+did you mean this\? +.*: Info:\s+subpt z0.d, z0.d, z0.d +.*: Error: expected an integer or stack pointer register at operand 2 -- `subpt x9,z0.d,z0.d' +.*: Error: expected an SVE vector or predicate register at operand 2 -- `subpt z0.d,x9,z0.d' +.*: Error: expected an SVE vector register at operand 3 -- `subpt z0.d,z0.d,x9' + +.*: Error: expected an SVE vector register at operand 2 -- `madpt z0.d,p0/m,z0.d,z0.d' +.*: Error: operand mismatch -- `madpt z10.b,z20.b,z30.b' +.*: Info:\s+did you mean this\? +.*: Info:\s+madpt z10.d, z20.d, z30.d +.*: Error: operand mismatch -- `madpt z20.h,z20.h,z30.h' +.*: Info:\s+did you mean this\? +.*: Info:\s+madpt z20.d, z20.d, z30.d +.*: Error: operand mismatch -- `madpt z20.s,z20.s,z30.s' +.*: Info:\s+did you mean this\? +.*: Info:\s+madpt z20.d, z20.d, z30.d +.*: Error: expected an SVE vector register at operand 1 -- `madpt w9,z0.d,z0.d' +.*: Error: expected an SVE vector register at operand 2 -- `madpt z0.d,w9,z0.d' +.*: Error: expected an SVE vector register at operand 3 -- `madpt z0.d,z0.d,w9' + +.*: Error: expected an SVE vector register at operand 2 -- `mlapt z0.d,p3/m,z0.d,z0.d' +.*: Error: operand mismatch -- `mlapt z10.b,z20.b,z30.b' +.*: Info:\s+did you mean this\? +.*: Info:\s+mlapt z10.d, z20.d, z30.d +.*: Error: operand mismatch -- `mlapt z20.h,z20.h,z30.h' +.*: Info:\s+did you mean this\? +.*: Info:\s+mlapt z20.d, z20.d, z30.d +.*: Error: operand mismatch -- `mlapt z20.s,z20.s,z30.s' +.*: Info:\s+did you mean this\? +.*: Info:\s+mlapt z20.d, z20.d, z30.d +.*: Error: expected an SVE vector register at operand 1 -- `mlapt w7,z0.d,z0.d' +.*: Error: expected an SVE vector register at operand 2 -- `mlapt z0.d,w7,z0.d' +.*: Error: expected an SVE vector register at operand 3 -- `mlapt z0.d,z0.d,w7' + +.*: Warning: output register of preceding `movprfx' expected as output at operand 1 -- `addpt z1.d,p0/m,z1.d,z2.d' +.*: Warning: predicate register differs from that in preceding `movprfx' at operand 2 -- `addpt z1.d,p3/m,z1.d,z2.d' +.*: Warning: output register of preceding `movprfx' expected as output at operand 1 -- `subpt z1.d,p0/m,z1.d,z2.d' +.*: Warning: predicate register differs from that in preceding `movprfx' at operand 2 -- `subpt z1.d,p3/m,z1.d,z2.d' +.*: Warning: predicated instruction expected after `movprfx' -- `madpt z10.d,z20.d,z30.d' +.*: Warning: predicated instruction expected after `movprfx' -- `mlapt z10.d,z20.d,z30.d' diff --git a/gas/testsuite/gas/aarch64/cpa-sve-bad.s b/gas/testsuite/gas/aarch64/cpa-sve-bad.s new file mode 100644 index 00000000000..e5d33c59d04 --- /dev/null +++ b/gas/testsuite/gas/aarch64/cpa-sve-bad.s @@ -0,0 +1,67 @@ +/* General incorrect input tests for CPA+SVE instructions. */ + +addpt z0.b, p0/m, z0.b, z0.b +addpt z0.d, p0/m, z1.d, z0.d +addpt z0.d, p0/m, z0.d, z0.s +addpt z0.h, p0/m, z0.h, z0.d +addpt x1, p0/m, z0.d, z0.d +addpt z0.d, x1, z0.d, z0.d +addpt z0.d, p0/m, x1, z0.d +addpt z0.d, p0/m, z0.d, x1 + +subpt z0.b, p0/m, z0.b, z0.b +subpt z0.d, p0/m, z1.d, z0.d +subpt z0.d, p0/m, z0.d, z0.s +subpt z0.h, p0/m, z0.h, z0.d +subpt x1, p0/m, z0.d, z0.d +subpt z0.d, x1, z0.d, z0.d +subpt z0.d, p0/m, x1, z0.d +subpt z0.d, p0/m, z0.d, x1 + +addpt z0.b, z0.b, z0.b +addpt z0.h, z0.h, z0.h +addpt z0.s, z0.s, z0.s +addpt x15, z0.d, z0.d +addpt z0.d, x15, z0.d +addpt z0.d, z0.d, x15 + +subpt z0.b, z0.b, z0.b +subpt z0.h, z0.h, z0.h +subpt z0.s, z0.s, z0.s +subpt x9, z0.d, z0.d +subpt z0.d, x9, z0.d +subpt z0.d, z0.d, x9 + +madpt z0.d, p0/m, z0.d, z0.d +madpt z10.b, z20.b, z30.b +madpt z20.h, z20.h, z30.h +madpt z20.s, z20.s, z30.s +madpt w9, z0.d, z0.d +madpt z0.d, w9, z0.d +madpt z0.d, z0.d, w9 + +mlapt z0.d, p3/m, z0.d, z0.d +mlapt z10.b, z20.b, z30.b +mlapt z20.h, z20.h, z30.h +mlapt z20.s, z20.s, z30.s +mlapt w7, z0.d, z0.d +mlapt z0.d, w7, z0.d +mlapt z0.d, z0.d, w7 + +/* MOVPRFX incorrect tests for CPA+SVE instructions. */ + +movprfx z2, z10 +addpt z1.d, p0/m, z1.d, z2.d +movprfx z1.d, p4/m, z10.d +addpt z1.d, p3/m, z1.d, z2.d + +movprfx z2, z10 +subpt z1.d, p0/m, z1.d, z2.d +movprfx z1.d, p4/m, z10.d +subpt z1.d, p3/m, z1.d, z2.d + +movprfx z10.d, p4/m, z11.d +madpt z10.d, z20.d, z30.d + +movprfx z10.d, p4/m, z11.d +mlapt z10.d, z20.d, z30.d diff --git a/gas/testsuite/gas/aarch64/cpa-sve-neg.d b/gas/testsuite/gas/aarch64/cpa-sve-neg.d new file mode 100644 index 00000000000..cf295fe8259 --- /dev/null +++ b/gas/testsuite/gas/aarch64/cpa-sve-neg.d @@ -0,0 +1,7 @@ +#name: Negative tests for CPA+SVE instructions. +#as: -march=armv8-a +#as: -march=armv8-a+sve +#as: -march=armv8-a+cpa +#as: -march=armv9-a +#source: cpa-sve-neg.s +#error_output: cpa-sve-neg.l diff --git a/gas/testsuite/gas/aarch64/cpa-sve-neg.l b/gas/testsuite/gas/aarch64/cpa-sve-neg.l new file mode 100644 index 00000000000..ed866499169 --- /dev/null +++ b/gas/testsuite/gas/aarch64/cpa-sve-neg.l @@ -0,0 +1,7 @@ +.*: Assembler messages: +.*: Error: selected processor does not support `addpt z0.d,p0/m,z0.d,z0.d' +.*: Error: selected processor does not support `subpt z0.d,p0/m,z0.d,z0.d' +.*: Error: selected processor does not support `addpt z0.d,z0.d,z0.d' +.*: Error: selected processor does not support `subpt z0.d,z0.d,z0.d' +.*: Error: selected processor does not support `madpt z0.d,z0.d,z0.d' +.*: Error: selected processor does not support `mlapt z0.d,z0.d,z0.d' diff --git a/gas/testsuite/gas/aarch64/cpa-sve-neg.s b/gas/testsuite/gas/aarch64/cpa-sve-neg.s new file mode 100644 index 00000000000..ab7a7b980dd --- /dev/null +++ b/gas/testsuite/gas/aarch64/cpa-sve-neg.s @@ -0,0 +1,6 @@ +addpt z0.d, p0/m, z0.d, z0.d +subpt z0.d, p0/m, z0.d, z0.d +addpt z0.d, z0.d, z0.d +subpt z0.d, z0.d, z0.d +madpt z0.d, z0.d, z0.d +mlapt z0.d, z0.d, z0.d diff --git a/gas/testsuite/gas/aarch64/cpa-sve.d b/gas/testsuite/gas/aarch64/cpa-sve.d new file mode 100644 index 00000000000..e2bf48a35bf --- /dev/null +++ b/gas/testsuite/gas/aarch64/cpa-sve.d @@ -0,0 +1,66 @@ +#name: Tests for CPA+SVE instructions. +#as: -march=armv8-a+sve+cpa +#objdump: -dr + +[^:]+: file format .* + + +[^:]+: + +[^:]+: +.*: 04c40000 addpt z0.d, p0/m, z0.d, z0.d +.*: 04c4001f addpt z31.d, p0/m, z31.d, z0.d +.*: 04c41c00 addpt z0.d, p7/m, z0.d, z0.d +.*: 04c403e0 addpt z0.d, p0/m, z0.d, z31.d +.*: 04c41fff addpt z31.d, p7/m, z31.d, z31.d +.*: 04c41229 addpt z9.d, p4/m, z9.d, z17.d + +.*: 04c50000 subpt z0.d, p0/m, z0.d, z0.d +.*: 04c5001f subpt z31.d, p0/m, z31.d, z0.d +.*: 04c51c00 subpt z0.d, p7/m, z0.d, z0.d +.*: 04c503e0 subpt z0.d, p0/m, z0.d, z31.d +.*: 04c51fff subpt z31.d, p7/m, z31.d, z31.d +.*: 04c50c5c subpt z28.d, p3/m, z28.d, z2.d + +.*: 04e00800 addpt z0.d, z0.d, z0.d +.*: 04e0081f addpt z31.d, z0.d, z0.d +.*: 04e00be0 addpt z0.d, z31.d, z0.d +.*: 04ff0800 addpt z0.d, z0.d, z31.d +.*: 04ff0bff addpt z31.d, z31.d, z31.d +.*: 04e90acd addpt z13.d, z22.d, z9.d + +.*: 04e00c00 subpt z0.d, z0.d, z0.d +.*: 04e00c1f subpt z31.d, z0.d, z0.d +.*: 04e00fe0 subpt z0.d, z31.d, z0.d +.*: 04ff0c00 subpt z0.d, z0.d, z31.d +.*: 04ff0fff subpt z31.d, z31.d, z31.d +.*: 04f00d3e subpt z30.d, z9.d, z16.d + +.*: 44c0d800 madpt z0.d, z0.d, z0.d +.*: 44c0d81f madpt z31.d, z0.d, z0.d +.*: 44dfd800 madpt z0.d, z31.d, z0.d +.*: 44c0dbe0 madpt z0.d, z0.d, z31.d +.*: 44dfdbff madpt z31.d, z31.d, z31.d +.*: 44cbdb44 madpt z4.d, z11.d, z26.d + +.*: 44c0d000 mlapt z0.d, z0.d, z0.d +.*: 44c0d01f mlapt z31.d, z0.d, z0.d +.*: 44c0d3e0 mlapt z0.d, z31.d, z0.d +.*: 44dfd000 mlapt z0.d, z0.d, z31.d +.*: 44dfd3ff mlapt z31.d, z31.d, z31.d +.*: 44c6d26a mlapt z10.d, z19.d, z6.d + +.*: 0420bd41 movprfx z1, z10 +.*: 04c40041 addpt z1.d, p0/m, z1.d, z2.d +.*: 04d13141 movprfx z1.d, p4/m, z10.d +.*: 04c41041 addpt z1.d, p4/m, z1.d, z2.d + +.*: 0420bc01 movprfx z1, z0 +.*: 04c50041 subpt z1.d, p0/m, z1.d, z2.d +.*: 04d13141 movprfx z1.d, p4/m, z10.d +.*: 04c51041 subpt z1.d, p4/m, z1.d, z2.d + +.*: 0420bc01 movprfx z1, z0 +.*: 44c2d861 madpt z1.d, z2.d, z3.d +.*: 0420bc01 movprfx z1, z0 +.*: 44c3d041 mlapt z1.d, z2.d, z3.d diff --git a/gas/testsuite/gas/aarch64/cpa-sve.s b/gas/testsuite/gas/aarch64/cpa-sve.s new file mode 100644 index 00000000000..6550306ffb6 --- /dev/null +++ b/gas/testsuite/gas/aarch64/cpa-sve.s @@ -0,0 +1,60 @@ +/* General tests for CPA+SVE instructions. */ + +addpt z0.d, p0/m, z0.d, z0.d +addpt z31.d, p0/m, z31.d, z0.d +addpt z0.d, p7/m, z0.d, z0.d +addpt z0.d, p0/m, z0.d, z31.d +addpt z31.d, p7/m, z31.d, z31.d +addpt z9.d, p4/m, z9.d, z17.d + +subpt z0.d, p0/m, z0.d, z0.d +subpt z31.d, p0/m, z31.d, z0.d +subpt z0.d, p7/m, z0.d, z0.d +subpt z0.d, p0/m, z0.d, z31.d +subpt z31.d, p7/m, z31.d, z31.d +subpt z28.d, p3/m, z28.d, z2.d + +addpt z0.d, z0.d, z0.d +addpt z31.d, z0.d, z0.d +addpt z0.d, z31.d, z0.d +addpt z0.d, z0.d, z31.d +addpt z31.d, z31.d, z31.d +addpt z13.d, z22.d, z9.d + +subpt z0.d, z0.d, z0.d +subpt z31.d, z0.d, z0.d +subpt z0.d, z31.d, z0.d +subpt z0.d, z0.d, z31.d +subpt z31.d, z31.d, z31.d +subpt z30.d, z9.d, z16.d + +madpt z0.d, z0.d, z0.d +madpt z31.d, z0.d, z0.d +madpt z0.d, z31.d, z0.d +madpt z0.d, z0.d, z31.d +madpt z31.d, z31.d, z31.d +madpt z4.d, z11.d, z26.d + +mlapt z0.d, z0.d, z0.d +mlapt z31.d, z0.d, z0.d +mlapt z0.d, z31.d, z0.d +mlapt z0.d, z0.d, z31.d +mlapt z31.d, z31.d, z31.d +mlapt z10.d, z19.d, z6.d + +/* MOVPRFX tests for CPA+SVE instructions. */ + +movprfx z1, z10 +addpt z1.d, p0/m, z1.d, z2.d +movprfx z1.d, p4/m, z10.d +addpt z1.d, p4/m, z1.d, z2.d + +movprfx z1, z0 +subpt z1.d, p0/m, z1.d, z2.d +movprfx z1.d, p4/m, z10.d +subpt z1.d, p4/m, z1.d, z2.d + +movprfx z1, z0 +madpt z1.d, z2.d, z3.d +movprfx z1, z0 +mlapt z1.d, z2.d, z3.d diff --git a/opcodes/aarch64-tbl.h b/opcodes/aarch64-tbl.h index 7232d6a9f35..f4626abb3bb 100644 --- a/opcodes/aarch64-tbl.h +++ b/opcodes/aarch64-tbl.h @@ -1885,6 +1885,10 @@ QLF4(S_S,P_M,S_S,S_S), \ QLF4(S_D,P_M,S_D,S_D), \ } +#define OP_SVE_VMVV_D \ +{ \ + QLF4(S_D,P_M,S_D,S_D), \ +} #define OP_SVE_VMVVU_HSD \ { \ QLF5(S_H,P_M,S_H,S_H,NIL), \ @@ -2657,6 +2661,8 @@ static const aarch64_feature_set aarch64_feature_rcpc3 = AARCH64_FEATURE (RCPC3); static const aarch64_feature_set aarch64_feature_cpa = AARCH64_FEATURE (CPA); +static const aarch64_feature_set aarch64_feature_cpa_sve = + AARCH64_FEATURES (2, CPA, SVE); #define CORE &aarch64_feature_v8 #define FP &aarch64_feature_fp @@ -2724,6 +2730,7 @@ static const aarch64_feature_set aarch64_feature_cpa = #define SVE2p1 &aarch64_feature_sve2p1 #define RCPC3 &aarch64_feature_rcpc3 #define CPA &aarch64_feature_cpa +#define CPA_SVE &aarch64_feature_cpa_sve #define CORE_INSN(NAME,OPCODE,MASK,CLASS,OP,OPS,QUALS,FLAGS) \ { NAME, OPCODE, MASK, CLASS, OP, CORE, OPS, QUALS, FLAGS, 0, 0, NULL } @@ -2898,6 +2905,9 @@ static const aarch64_feature_set aarch64_feature_cpa = { NAME, OPCODE, MASK, CLASS, 0, RCPC3, OPS, QUALS, FLAGS, 0, 0, NULL } #define CPA_INSN(NAME,OPCODE,MASK,CLASS,OPS,QUALS) \ { NAME, OPCODE, MASK, CLASS, 0, CPA, OPS, QUALS, 0, 0, 0, NULL } +#define CPA_SVE_INSNC(NAME,OPCODE,MASK,CLASS,OPS,QUALS,CONSTRAINTS,TIED) \ + { NAME, OPCODE, MASK, CLASS, 0, CPA_SVE, OPS, QUALS, \ + F_STRICT, CONSTRAINTS, TIED, NULL } #define MOPS_CPY_OP1_OP2_PME_INSN(NAME, OPCODE, MASK, FLAGS, CONSTRAINTS) \ MOPS_INSN (NAME, OPCODE, MASK, 0, \ @@ -6408,6 +6418,14 @@ const struct aarch64_opcode aarch64_opcode_table[] = CPA_INSN ("maddpt", 0x9b600000, 0xffe08000, aarch64_misc, OP4 (Rd, Rn, Rm, Ra), QL_I4SAMEX), CPA_INSN ("msubpt", 0x9b608000, 0xffe08000, aarch64_misc, OP4 (Rd, Rn, Rm, Ra), QL_I4SAMEX), + CPA_SVE_INSNC ("addpt", 0x04c40000, 0xffffe000, sve_misc, OP4 (SVE_Zd, SVE_Pg3, SVE_Zd, SVE_Zm_5), OP_SVE_VMVV_D, C_SCAN_MOVPRFX, 2), + CPA_SVE_INSNC ("addpt", 0x04e00800, 0xffe0fc00, sve_misc, OP3 (SVE_Zd, SVE_Zn, SVE_Zm_16), OP_SVE_VVV_D, 0, 0), + CPA_SVE_INSNC ("subpt", 0x04c50000, 0xffffe000, sve_misc, OP4 (SVE_Zd, SVE_Pg3, SVE_Zd, SVE_Zm_5), OP_SVE_VMVV_D, C_SCAN_MOVPRFX, 2), + CPA_SVE_INSNC ("subpt", 0x04e00c00, 0xffe0fc00, sve_misc, OP3 (SVE_Zd, SVE_Zn, SVE_Zm_16), OP_SVE_VVV_D, 0, 0), + + CPA_SVE_INSNC ("madpt", 0x44c0d800, 0xffe0fc00, sve_misc, OP3 (SVE_Zd, SVE_Zm_16, SVE_Za_5), OP_SVE_VVV_D, C_SCAN_MOVPRFX, 0), + CPA_SVE_INSNC ("mlapt", 0x44c0d000, 0xffe0fc00, sve_misc, OP3 (SVE_Zd, SVE_Zn, SVE_Zm_16), OP_SVE_VVV_D, C_SCAN_MOVPRFX, 0), + {0, 0, 0, 0, 0, 0, {}, {}, 0, 0, 0, NULL}, };