From patchwork Thu Dec 4 12:42:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinath Parvathaneni X-Patchwork-Id: 125893 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A9AF94BC89BC for ; Thu, 4 Dec 2025 12:45:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A9AF94BC89BC Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=NQYEF4DB; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=NQYEF4DB X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from MRWPR03CU001.outbound.protection.outlook.com (mail-francesouthazon11011068.outbound.protection.outlook.com [40.107.130.68]) by sourceware.org (Postfix) with ESMTPS id B56BA4BA2E01 for ; Thu, 4 Dec 2025 12:44:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B56BA4BA2E01 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 B56BA4BA2E01 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.130.68 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1764852244; cv=pass; b=QAx3yr4iz2mwd40UXvCugjCCjj2eeyf51YkGYnzQuDLZwNcO6ShEKv6ulPSIrWnEenLJCF5wLQIVUON2xOeU4kkspMLrQrr0buE6iImMEgbj7sZzuKv0cdEAYXcm3M8U2a7ALg4uPKE3ABdLxDhK2jERjJ5JDVDOeLTtQZUMS0g= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1764852244; c=relaxed/simple; bh=DUlqFPySgzPhd4QwIqRWkayd1SIc4QK4zPvi0XW38x8=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=SUjeMVNlw+aW6d7yWZ//yw0G/XJT4VIojpRrRK3Ju3NP1GrNPcoYCdQ5/7dpSQhovhr8hC0gtgp0hcw1kpZpyIDUOdgQpyyfl0qLSrAfb/LfIoQLGGwQjLMDs6Et18eLpofs1gtKZ7QsRzhAKKWgt/CjlxVueXkIS3lQwTaGBjg= ARC-Authentication-Results: i=3; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B56BA4BA2E01 ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=W72wpukdNDZl1laHw6vHLp5lQ4Hdb5YUx8EEyMCF9zEiopsRwuIEPZu4elCGumJnfQU3j5s6+B/Cewc46DniJN/jlxp9/dX1ffwQPwR7MabFr4kbgvo60ZqY/63rkK1xvCZwc4x5l4o96qcZz8t4FUVk8zmrtWakamJcaHOu6spQQlK+i+Zq+IPHfoxEgTintrN6ygIwCY4gM4iIewQz+C7s/JavCXquXad6H7kkG4b9TujAks/wrPT6oLrJRaemxgQilTaR0k9gjYWV7j3z9F7+4zC3oh8Z540mAODBQuQJLyy3Bz5YfRvGbCvcH+s28HiBPmJ1VrGY8V74Kj6ZaQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=F0FQRwc1udDaGH9qHn3g6I8BGbKQgGW1wW12i/LH8z4=; b=bXzscJVkjRC8EKKyiRqVuftpbzOspv2zJcBd7MDKr48CTHzBlVuc5KLiOaxkJhKAwkuzhVoOqYoAkr0y2u15eyy8fJvlsvizmMEt6murN1UZfLXe9rpxVRZM+PYu9rqiCORYompc8XeCgRadCtNuh/fXKy6q3hfVWIrefxZQRXfYdGvkoOr7AU1ZS/BGcs7PYNRycaCjqc12h+uRUdM2hb3iTrKN7wlhok6jAQ2LNmaje0MYvjy6j6sEyP72oIbbvac+SMNBMsiYufa53Yq8WSSLWEQnn4/MwKUPugPiKllwUeJryGy5A7uAxycnnEVZL4Eizw16zIUHLGkFeFbz1g== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 4.158.2.129) 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=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=F0FQRwc1udDaGH9qHn3g6I8BGbKQgGW1wW12i/LH8z4=; b=NQYEF4DBIxVfY7c5eHNv6cpGVwHj+hhkRDuOnv5QLI7Iqw70QxmYbyJ/mDd2qvD4GN1LfJMJFXp+slq/O4edYbNEoUJanTTYfNovGtC8bxWpUtIR/1JBPq22IgQ0m5gSixS8C+WHPB33BspyNSDtvaMIoova7r+X6mjyqUJHUZo= Received: from DU2PR04CA0208.eurprd04.prod.outlook.com (2603:10a6:10:28d::33) by FRZPR08MB11100.eurprd08.prod.outlook.com (2603:10a6:d10:135::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9388.9; Thu, 4 Dec 2025 12:43:54 +0000 Received: from DB5PEPF00014B9B.eurprd02.prod.outlook.com (2603:10a6:10:28d:cafe::b9) by DU2PR04CA0208.outlook.office365.com (2603:10a6:10:28d::33) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9388.11 via Frontend Transport; Thu, 4 Dec 2025 12:43:53 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 4.158.2.129) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=arm.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 4.158.2.129 as permitted sender) receiver=protection.outlook.com; client-ip=4.158.2.129; helo=outbound-uk1.az.dlp.m.darktrace.com; pr=C Received: from outbound-uk1.az.dlp.m.darktrace.com (4.158.2.129) by DB5PEPF00014B9B.mail.protection.outlook.com (10.167.8.168) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9388.8 via Frontend Transport; Thu, 4 Dec 2025 12:43:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=TLo0fbf1PO5t2t2CuhMW5MZw9TIHdhOlatN8zFhwnc5i03MHgbA46ffS75a9aqFGs5jqXIYPSu5tJX0zsHRw50YVp7hmhJcqzvA2gMYIGzah4o79ECpQfHR9SnlGg4LyJjnr07cQy48eWvGXGPiA5FtILxuIbkeYwhpm+ZiJ5HijFozDWYZ9ne1sgoUboYDNJ8i9Ogl8LLup335vL1vLYeOSE9h8SQWqwQOF+Gj18OXJgF305Fw90cYcjwCBHmtYwL49JcTvIJ9IEPyRWim8YDWPpxmQUHx6bjcCMUuWTAyPrn6zzWelMz1xvCPVu+2/HdL5cLM+SC6iey36rDMoHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=F0FQRwc1udDaGH9qHn3g6I8BGbKQgGW1wW12i/LH8z4=; b=rtfNdKQ/OPavz88+evUWsxr2NO0VTBVUdtJOolQ3RTopnQD2txdLDg38sff/F6qCd2OBzzWMwc9qHQjYX917ZOQ6A5jM9IzMhb5OT30xWkNUv1QfzNLjusbraBOYFCsaCc9E/VAbrsNUIkwc0p9ClZliOP696c+WhH15he0rS5uQJfl+/Hl9NPWm6Llb4g9NJ6pG4gHPywB9hUOetsIcUpSu16vB9WaAABWj2N/qEKCkGWWo91mbZ9g0LP6fePhs0X9Jdbm7k85yU9FuI54SRdYJEMP6ai9T2FI7oqkTvfDR6kJLV+8jRzJbnEiI5Igz+k0WG1fbpiTWw8aV/8z8wA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 172.205.89.229) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=F0FQRwc1udDaGH9qHn3g6I8BGbKQgGW1wW12i/LH8z4=; b=NQYEF4DBIxVfY7c5eHNv6cpGVwHj+hhkRDuOnv5QLI7Iqw70QxmYbyJ/mDd2qvD4GN1LfJMJFXp+slq/O4edYbNEoUJanTTYfNovGtC8bxWpUtIR/1JBPq22IgQ0m5gSixS8C+WHPB33BspyNSDtvaMIoova7r+X6mjyqUJHUZo= Received: from AM8P190CA0001.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:219::6) by VI1PR08MB5502.eurprd08.prod.outlook.com (2603:10a6:803:12f::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9388.9; Thu, 4 Dec 2025 12:42:46 +0000 Received: from AMS0EPF000001A6.eurprd05.prod.outlook.com (2603:10a6:20b:219:cafe::ae) by AM8P190CA0001.outlook.office365.com (2603:10a6:20b:219::6) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9388.9 via Frontend Transport; Thu, 4 Dec 2025 12:42:45 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 172.205.89.229) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 172.205.89.229 as permitted sender) receiver=protection.outlook.com; client-ip=172.205.89.229; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (172.205.89.229) by AMS0EPF000001A6.mail.protection.outlook.com (10.167.16.233) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9388.8 via Frontend Transport; Thu, 4 Dec 2025 12:42:46 +0000 Received: from AZ-NEU-EX03.Arm.com (10.240.25.137) by AZ-NEU-EX04.Arm.com (10.240.25.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.29; Thu, 4 Dec 2025 12:42:45 +0000 Received: from e120703.cambridge.arm.com (10.2.81.20) by mail.arm.com (10.240.25.137) with Microsoft SMTP Server id 15.2.2562.29 via Frontend Transport; Thu, 4 Dec 2025 12:42:45 +0000 From: Srinath Parvathaneni To: CC: , , , Srinath Parvathaneni , Matthew Malcomson Subject: [PATCH v1 1/3] aarch64: Add support for POE2 instructions. Date: Thu, 4 Dec 2025 12:42:33 +0000 Message-ID: <20251204124235.74048-2-srinath.parvathaneni@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20251204124235.74048-1-srinath.parvathaneni@arm.com> References: <20251204124235.74048-1-srinath.parvathaneni@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: AMS0EPF000001A6:EE_|VI1PR08MB5502:EE_|DB5PEPF00014B9B:EE_|FRZPR08MB11100:EE_ X-MS-Office365-Filtering-Correlation-Id: bc189b02-fb87-44a4-fa42-08de3332c825 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|376014|36860700013|82310400026|1800799024; X-Microsoft-Antispam-Message-Info-Original: IW4dhMwib9Zn8mi4C2sa0NYVJadse6N0WHaWjAqL36PWoMOhxwSh5zCUeiWBrxeGAvXA1fH5+5TzoF+W3DCoJkH2JEXcFKPxj82z0OfICwUQAwZxbI5fnMBLDhPrF7/eL9WclgYC21rorELEKjjV0+jodXX+XsenOytVgh4olRPtKuRKX21kyD+T7zz7iZBnYPjQk7w3rxENh2I4smMcErvfmcfbHlJm8FG/w5C8wnuyoTKIEus6phwbivWumbLqfxAptrX/Kwdf8Qof1ibwVJgBXlDmzf/qPtq+CKQ693TF68P7y7NvzV3F8D0Bsj3k3OBlmm+MtsP4YeTio9WBIj0WxXV6/DvQr0wTb8ls2KdisXbTcoJ9hKNkgzYqHmJ2fouOSoY2ElWQnSVMS3NoinSpQz47WDw+ejcQ/imTv4WeZnwGZkMN2GglyTIVwl3K47zjyDc4zg+X0sZCgdASfgISMm+UVmkIK4FG67ydLuX94qSMlY0umHHCbjR20gplbc694dKLDTLJtCFgDlZNFg6Kg+Jh/44SLa8eB8d93A4BjibVKruJ0JLKDuKgpKyG9FmWAJnC860ZF+8HWbrbQLy7BZoAYGzbkdJTJMjXBF2rBBe/rc63EXJ3FQh5TSc7og/jEcgRLACjHskLpbmv8ZN6RFlZz/jLnpxpFgnM2pOQMDqAwHMTtZL8AXmhmEmw+Gmvyl+FCLODqADJGW0R0t0DJQgTEucqDQEZXZk1KX6d7Nw4J203NZK4ROIYsJYKwIQoD+WoJJeM4zA/kGeJi4wMA0EohN92ytC6BxIyCh3xPseG5iK2e706DKaJ8wzn2wUCz8dWXmhz5nRx+HqpQmQMXBTpbV03c2grcGuJnHG5GoOV9frIMLPXsSptJ51nPf5/xhoUwFD6Er5o3bGvNLwZ/kJPoseIrR3lVKtpUUQwAAE8LLxFWqVi/wtvJ9SmiuGg7FowBWtv7k7jC0rTFyMtaOE1FI08+uibMmNyATYL5RAJossossMHBLm7BuCaOWPIS5hZuqfZbb4e3RyjMiTkIXasDDxHZ5AhbLa545NbItdkn3oxeA16ZsMsAR9As4zOZzsP53hj8UT6nWa/6tmtnNojgo5LCqTsREjS9GIAWSgUwzHoWo4oskNgdue26M51mTgL3HuBqnZyM4wP67jdPqoUqX0OB2OlPNG+uPiGR3SIxNElMyfhhRJWUZj/Hv5tSAdyPNbyNMxcNNRYwgnkKRGCdgSHfbUnv7dh/lXBey6YlqvZx9D2HIF5+doPZ+/fZz6Qq3c1LDc8bKgFi4JPSls7YOS8I1Uf3IPMiT5k/t24HBBhoH7BejzxErH0qSB421wFwRsWOJMFvNmE2wCC7sKuG2U8sQgfSJCjWNxBmE2dj6sirotjZnUKe1rgoA/SDl1jX7iLutRpiKH14b6xZLip2PiXVOMME+IP1mRDIP0Ncgj39MPOD5cNJ+d9tuP65P2Ro1kddNRjWZZ2cuMpUD9gvPhn+98DZ1krkumh5o5OWI+dyAit2EImjwJLATWXIJW65EaWfjHXZCjNIsuUC33+b+2KNGR7kOlPYeI= X-Forefront-Antispam-Report-Untrusted: CIP:172.205.89.229; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(376014)(36860700013)(82310400026)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB5502 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5PEPF00014B9B.eurprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: f494684e-08e0-4cb4-2e03-08de3332a042 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|376014|82310400026|1800799024|14060799003|35042699022; X-Microsoft-Antispam-Message-Info: 7BovKqfURKJv0/AolpTFuxJ8OfS8Eh3Hr4JPkrR7eivIaRVnBCIZ/e+dpoi+XBPWO9Q06P1T94rHYpr29gKlk741z9deqdeM/OXCig4lMD5DJFaJhsjYSDr/J4XhKEg7/7306srqQ5y2g3HbpYauERQ8N74g3dBMeADj3kSG4hAtVSSmT0qvW6PgEi5IbSME1TCug6slQymUA/LzlHWw2/vSi3zC025Sg8IDGBTMYT1oSprieMM8m15Vt9fsaTSy9p+FpdE0CM6vEfritsmxPor+PMwMy1wSn0cl9rdwzZFlu20+1B7g5kw6Ly2xQCjrSYsW+c07LjFSeNQ9fm/cAAsyslLMHHcU/p+5WYVVM2tskog8VjytCo1rF7RoJim41B28Q43XHAwgK/6UzT0098/Xbrtyamg0BXd1z/ER+9LfVdboUwS/AY+Z9Q69tNegYkM1o4zTI25u8icqoshQvUFhcLnKcMyY3QWxM4RMTzIrG4CVNrum6DfWWRAoo9GEyfVT9bJznJl4tsVjbMXMneO2qT+olJL39DvysTJVQ73gj26Q8hxf3jXfK79LdifPRFNxuF29SJPJWMpjLA3O/xqv8ALo8cppvigo2wXCcMHKliVkm78qPYnfatz0UZ0GzVF0MFwXiZJzZjotJCWqJpO4vJdPs+R8iRY5cF/LjsJ0Ft0/X3+Gu1GoiV1V0c6MMRUpvqFCuSgyjuFi1k9AjSYvMEgcLJwn8nyOVjcBIkS/iNFrSg2mjkiKjwBLh6ytK91/wIouiS7TAHSQVc95JGk4Uem+06xKDR8HuTk574RWyHC1lTjUBzlyr6DM0VFR9Eb4ghwpaazdYsx4HexFrKTwkOOe2oZ+j+I9rXyNe8x+T3KA6Pan/qOJ5JAm0ohXMJQMHojr8gVXHFguE+i7ScnYNIvLKl4oDDAboEAz+di8duYEzohcz/UaLilO0ueOEZKX86jEMTb4eqPbFiUSwvBBPzjGdJFYbe1DrPXFGWIFbVhpTSmp7q/guMl6TFpPcLlFdZYFJmr41JSYkpeCgeW6oyQJiKwkpZTaFEAuQNr5UJ4k1K4GLdb4shGMkl1O4pUSIjy/HzThfFq/3fe2EUIpfDoguGQJtoJtlAHgZkV+H5KTLA0husk1L/Im8gzkK792wi786AXwSObqSHhPuqL4pOhyQfm+kzDSWuG51PuO2Y6TNfTKZtda7LrZsIdj0TE9sPf3oolDaII47Lo7xhVdQnAgC1fhZMg3Kr+fofCcOloiAzEzzYB8tdSUXXDJ7gAXJIuGQim/+GXH269yfKwxgTw4qw2RekaeN17nKFyPrgLPKxgYjKrNEoRR7s780Wna6qDy0fvWho8k0rVLHJh3Zz194VwzCum0yHaP3ERTD5H82v13Y5wj8zsjNCuGbl5jZhvJlYlFaSJ18TxvupJGnLCFnnSj8RIcSgLTaq0JRj9VPDFuTVn4FjO2JSJ7LhAOW/iH+p8R61Zz5Oo3ElXIqQASlDa2Us1rW/QOOKoLpnjQ1tzQlwrAxE3vnqfwCJMz8aON4vcl/Z4YfzgvoNNq7Ax6cf4a/CIM2/ozGmk= X-Forefront-Antispam-Report: CIP:4.158.2.129; CTRY:GB; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:outbound-uk1.az.dlp.m.darktrace.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(36860700013)(376014)(82310400026)(1800799024)(14060799003)(35042699022); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Dec 2025 12:43:53.2045 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bc189b02-fb87-44a4-fa42-08de3332c825 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[4.158.2.129]; Helo=[outbound-uk1.az.dlp.m.darktrace.com] X-MS-Exchange-CrossTenant-AuthSource: DB5PEPF00014B9B.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: FRZPR08MB11100 X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FORGED_SPF_HELO, GIT_PATCH_0, KAM_LOTSOFHASH, RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on 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 This patch adds support for FEAT_S1POE2 feature enabled by "+poe2" flag along with support for following instructions. * TCHANGEB (immediate) * TCHANGEB (register) * TCHANGEF (immediate) * TCHANGEF (register) A new operand AARCH64_OPND_NOT_BALANCED is added to the code in this patch to support the new optional argument "NB" (not_balanced) which is a 1-bit field in the encoding for all the above mentioned instructions. Regression tested for aarch64-none-elf target and found no regressions. Ok for binutils-master? Regards, Srinath Co-authored-by: Matthew Malcomson --- gas/config/tc-aarch64.c | 29 ++++++++ gas/doc/c-aarch64.texi | 2 + gas/testsuite/gas/aarch64/poe2-invalid-1.d | 4 ++ gas/testsuite/gas/aarch64/poe2-invalid-1.l | 63 ++++++++++++++++++ gas/testsuite/gas/aarch64/poe2-invalid-1.s | 77 ++++++++++++++++++++++ gas/testsuite/gas/aarch64/poe2-invalid-2.d | 4 ++ gas/testsuite/gas/aarch64/poe2-invalid-2.l | 61 +++++++++++++++++ gas/testsuite/gas/aarch64/poe2.d | 69 +++++++++++++++++++ gas/testsuite/gas/aarch64/poe2.s | 75 +++++++++++++++++++++ include/opcode/aarch64.h | 5 ++ opcodes/aarch64-asm-2.c | 1 + opcodes/aarch64-dis-2.c | 69 +++++++++++++++---- opcodes/aarch64-opc-2.c | 1 + opcodes/aarch64-opc.c | 11 ++++ opcodes/aarch64-opc.h | 1 + opcodes/aarch64-tbl-2.h | 4 ++ opcodes/aarch64-tbl.h | 20 ++++++ 17 files changed, 482 insertions(+), 14 deletions(-) create mode 100644 gas/testsuite/gas/aarch64/poe2-invalid-1.d create mode 100644 gas/testsuite/gas/aarch64/poe2-invalid-1.l create mode 100644 gas/testsuite/gas/aarch64/poe2-invalid-1.s create mode 100644 gas/testsuite/gas/aarch64/poe2-invalid-2.d create mode 100644 gas/testsuite/gas/aarch64/poe2-invalid-2.l create mode 100644 gas/testsuite/gas/aarch64/poe2.d create mode 100644 gas/testsuite/gas/aarch64/poe2.s diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c index 0ca54c3bd40..5eae44b1b8a 100644 --- a/gas/config/tc-aarch64.c +++ b/gas/config/tc-aarch64.c @@ -6441,6 +6441,10 @@ process_omitted_operand (enum aarch64_opnd type, const aarch64_opcode *opcode, operand->hint_option = aarch64_hint_options + default_value; break; + case AARCH64_OPND_NOT_BALANCED: + operand->imm.value = default_value; + break; + default: break; } @@ -8173,6 +8177,20 @@ parse_operands (char *str, const aarch64_opcode *opcode) info->barrier = aarch64_barrier_dsb_nxs_options + val; break; + case AARCH64_OPND_NOT_BALANCED: + val = parse_barrier (&str); + if (val != PARSE_FAIL) + info->imm.value = val; + else + { + set_syntax_error (_("the specified operand is not accepted in" + " TCHANGE instruction")); + /* Turn off backtrack as this optional operand is present. */ + backtrack_pos = 0; + goto failure; + } + break; + case AARCH64_OPND_PRFOP: val = parse_pldop (&str); @@ -10512,6 +10530,16 @@ md_begin (void) } } + for (i = 0; i < ARRAY_SIZE (aarch64_nb_options); i++) + { + const char *name = aarch64_nb_options[i].name; + checked_hash_insert (aarch64_barrier_opt_hsh, name, + aarch64_nb_options + i); + /* Also hash the name in the upper case. */ + checked_hash_insert (aarch64_barrier_opt_hsh, get_upper_str (name), + aarch64_nb_options + i); + } + for (i = 0; i < ARRAY_SIZE (aarch64_barrier_options); i++) { const char *name = aarch64_barrier_options[i].name; @@ -10818,6 +10846,7 @@ static const struct aarch64_option_cpu_value_table aarch64_features[] = { {"sb", AARCH64_FEATURE (SB), AARCH64_NO_FEATURES}, {"predres", AARCH64_FEATURE (PREDRES), AARCH64_NO_FEATURES}, {"predres2", AARCH64_FEATURE (PREDRES2), AARCH64_FEATURE (PREDRES)}, + {"poe2", AARCH64_FEATURE (S1POE2), AARCH64_NO_FEATURES}, {"aes", AARCH64_FEATURE (AES), AARCH64_FEATURE (SIMD)}, {"sm4", AARCH64_FEATURE (SM4), AARCH64_FEATURE (SIMD)}, {"sha3", AARCH64_FEATURE (SHA3), AARCH64_FEATURE (SHA2)}, diff --git a/gas/doc/c-aarch64.texi b/gas/doc/c-aarch64.texi index 9683d411ce9..2064d22706b 100644 --- a/gas/doc/c-aarch64.texi +++ b/gas/doc/c-aarch64.texi @@ -267,6 +267,8 @@ automatically cause those extensions to be disabled. @tab Enable additional prediction restriction instructions. @item @code{profile} @tab @tab Enable statistical profiling extensions. +@item @code{poe2} @tab + @tab Enable Permission overlays extension 2. @item @code{ras} @tab @tab Enable the Reliability, Availability and Serviceability extension. @item @code{rasv2} @tab @code{ras} diff --git a/gas/testsuite/gas/aarch64/poe2-invalid-1.d b/gas/testsuite/gas/aarch64/poe2-invalid-1.d new file mode 100644 index 00000000000..7aa529ce244 --- /dev/null +++ b/gas/testsuite/gas/aarch64/poe2-invalid-1.d @@ -0,0 +1,4 @@ +#name: Invalid poe2 TCHANGE instructions. +#source: poe2-invalid-1.s +#as: -march=armv8-a+poe2 +#error_output: poe2-invalid-1.l diff --git a/gas/testsuite/gas/aarch64/poe2-invalid-1.l b/gas/testsuite/gas/aarch64/poe2-invalid-1.l new file mode 100644 index 00000000000..df536613fde --- /dev/null +++ b/gas/testsuite/gas/aarch64/poe2-invalid-1.l @@ -0,0 +1,63 @@ +.*: Assembler messages: +.*: Error: constant expression required at operand 2 -- `tchangef x0,x31' +.*: Error: expected an integer or zero register at operand 1 -- `tchangef x31,x3' +.*: Error: comma expected between operands at operand 2 -- `tchangef x7' +.*: Error: the specified operand is not accepted in TCHANGE instruction at operand 3 -- `tchangef x15,x30,' +.*: Error: the specified operand is not accepted in TCHANGE instruction at operand 3 -- `tchangef x30,x0,x10' +.*: Error: comma expected between operands at operand 2 -- `tchangef x10 x0' +.*: Error: expected an integer or zero register at operand 1 -- `tchangef #1,#100' +.*: Error: expected an integer or zero register at operand 1 -- `tchangef #10,x0' +.*: Error: the specified operand is not accepted in TCHANGE instruction at operand 3 -- `tchangef x0,x1,nbb' +.*: Error: comma expected between operands at operand 3 -- `tchangef x1,x3 nb' +.*: Error: the specified operand is not accepted in TCHANGE instruction at operand 3 -- `tchangef x3,x7,n' +.*: Error: unexpected characters following instruction at operand 3 -- `tchangef x7,x15,nb,nb' +.*: Error: the specified operand is not accepted in TCHANGE instruction at operand 3 -- `tchangef x15,x30,Nb' +.*: Error: the specified operand is not accepted in TCHANGE instruction at operand 3 -- `tchangef x30,x0,nB' +.*: Error: constant expression required at operand 2 -- `tchangef x10,NB,NB' +.*: Error: expected an integer or zero register at operand 1 -- `tchangef NB,x10,NB' +.*: Error: immediate value out of range 0 to 127 at operand 2 -- `tchangef x0,#-10' +.*: Error: immediate value out of range 0 to 127 at operand 2 -- `tchangef x0,#128' +.*: Error: immediate value out of range 0 to 127 at operand 2 -- `tchangef x1,#3111' +.*: Error: missing immediate expression at operand 2 -- `tchangef x3,#' +.*: Error: expected an integer or zero register at operand 1 -- `tchangef x31,#15' +.*: Error: constant expression required at operand 2 -- `tchangef x10,nb,#127' +.*: Error: immediate value out of range 0 to 127 at operand 2 -- `tchangef x0,#-10,nb' +.*: Error: the specified operand is not accepted in TCHANGE instruction at operand 3 -- `tchangef x0,#1,nB' +.*: Error: the specified operand is not accepted in TCHANGE instruction at operand 3 -- `tchangef x1,#3,Nb' +.*: Error: immediate value out of range 0 to 127 at operand 2 -- `tchangef x3,#777,nb' +.*: Error: the specified operand is not accepted in TCHANGE instruction at operand 3 -- `tchangef x7,#15,nbb' +.*: Error: comma expected between operands at operand 3 -- `tchangef x15,#31 NB' +.*: Error: expected an integer or zero register at operand 1 -- `tchangef x31,#63,nb' +.*: Error: expected an integer or zero register at operand 1 -- `tchangef NB,x10,#127' +.*: Error: constant expression required at operand 2 -- `tchangef x10,NB,#128' +.*: Error: constant expression required at operand 2 -- `tchangeb x0,x31' +.*: Error: expected an integer or zero register at operand 1 -- `tchangeb x31,x3' +.*: Error: comma expected between operands at operand 2 -- `tchangeb x7' +.*: Error: the specified operand is not accepted in TCHANGE instruction at operand 3 -- `tchangeb x15,x30,' +.*: Error: the specified operand is not accepted in TCHANGE instruction at operand 3 -- `tchangeb x30,x0,x10' +.*: Error: comma expected between operands at operand 2 -- `tchangeb x10 x0' +.*: Error: expected an integer or zero register at operand 1 -- `tchangeb #1,#100' +.*: Error: expected an integer or zero register at operand 1 -- `tchangeb #10,x0' +.*: Error: the specified operand is not accepted in TCHANGE instruction at operand 3 -- `tchangeb x0,x1,nbb' +.*: Error: comma expected between operands at operand 3 -- `tchangeb x1,x3 nb' +.*: Error: the specified operand is not accepted in TCHANGE instruction at operand 3 -- `tchangeb x3,x7,n' +.*: Error: unexpected characters following instruction at operand 3 -- `tchangeb x7,x15,nb,nb' +.*: Error: the specified operand is not accepted in TCHANGE instruction at operand 3 -- `tchangeb x15,x30,Nb' +.*: Error: the specified operand is not accepted in TCHANGE instruction at operand 3 -- `tchangeb x30,x0,nB' +.*: Error: constant expression required at operand 2 -- `tchangeb x10,NB,NB' +.*: Error: expected an integer or zero register at operand 1 -- `tchangeb NB,x10,NB' +.*: Error: immediate value out of range 0 to 127 at operand 2 -- `tchangeb x0,#-10' +.*: Error: immediate value out of range 0 to 127 at operand 2 -- `tchangeb x0,#128' +.*: Error: immediate value out of range 0 to 127 at operand 2 -- `tchangeb x1,#3111' +.*: Error: missing immediate expression at operand 2 -- `tchangeb x3,#' +.*: Error: expected an integer or zero register at operand 1 -- `tchangeb x31,#15' +.*: Error: constant expression required at operand 2 -- `tchangeb x10,nb,#127' +.*: Error: immediate value out of range 0 to 127 at operand 2 -- `tchangeb x0,#-10,nb' +.*: Error: the specified operand is not accepted in TCHANGE instruction at operand 3 -- `tchangeb x0,#1,nB' +.*: Error: the specified operand is not accepted in TCHANGE instruction at operand 3 -- `tchangeb x1,#3,Nb' +.*: Error: immediate value out of range 0 to 127 at operand 2 -- `tchangeb x3,#777,nb' +.*: Error: the specified operand is not accepted in TCHANGE instruction at operand 3 -- `tchangeb x7,#15,nbb' +.*: Error: comma expected between operands at operand 3 -- `tchangeb x15,#31 NB' +.*: Error: expected an integer or zero register at operand 1 -- `tchangeb x31,#63,nb' +.*: Error: expected an integer or zero register at operand 1 -- `tchangeb NB,x10,#127' +.*: Error: constant expression required at operand 2 -- `tchangeb x10,NB,#128' diff --git a/gas/testsuite/gas/aarch64/poe2-invalid-1.s b/gas/testsuite/gas/aarch64/poe2-invalid-1.s new file mode 100644 index 00000000000..8c214466b52 --- /dev/null +++ b/gas/testsuite/gas/aarch64/poe2-invalid-1.s @@ -0,0 +1,77 @@ +#TCHANGEF (register) instructions + tchangef x0, x31 + tchangef x31, x3 + tchangef x7 + tchangef x15, x30, + tchangef x30, x0, x10 + tchangef x10 x0 + tchangef #1, #100 + tchangef #10, x0 + +#TCHANGEF (register) instructions with not_balanced + tchangef x0, x1, nbb + tchangef x1, x3 nb + tchangef x3, x7, n + tchangef x7, x15, nb, nb + tchangef x15, x30, Nb + tchangef x30, x0, nB + tchangef x10, NB, NB + tchangef NB, x10, NB + +#TCHANGEF (immediate) instructions + tchangef x0, #-10 + tchangef x0, #128 + tchangef x1, #3111 + tchangef x3, # + tchangef x31, #15 + tchangef x10, nb, #127 + +#TCHANGEF (immediate) instructions with not_balanced + tchangef x0, #-10, nb + tchangef x0, #1, nB + tchangef x1, #3, Nb + tchangef x3, #777, nb + tchangef x7, #15, nbb + tchangef x15, #31 NB + tchangef x31, #63, nb + tchangef NB, x10, #127 + tchangef x10, NB, #128 + +#TCHANGEB (register) instructions + tchangeb x0, x31 + tchangeb x31, x3 + tchangeb x7 + tchangeb x15, x30, + tchangeb x30, x0, x10 + tchangeb x10 x0 + tchangeb #1, #100 + tchangeb #10, x0 + +#TCHANGEB (register) instructions with not_balanced + tchangeb x0, x1, nbb + tchangeb x1, x3 nb + tchangeb x3, x7, n + tchangeb x7, x15, nb, nb + tchangeb x15, x30, Nb + tchangeb x30, x0, nB + tchangeb x10, NB, NB + tchangeb NB, x10, NB + +#TCHANGEB (immediate) instructions + tchangeb x0, #-10 + tchangeb x0, #128 + tchangeb x1, #3111 + tchangeb x3, # + tchangeb x31, #15 + tchangeb x10, nb, #127 + +#TCHANGEB (immediate) instructions with not_balanced + tchangeb x0, #-10, nb + tchangeb x0, #1, nB + tchangeb x1, #3, Nb + tchangeb x3, #777, nb + tchangeb x7, #15, nbb + tchangeb x15, #31 NB + tchangeb x31, #63, nb + tchangeb NB, x10, #127 + tchangeb x10, NB, #128 diff --git a/gas/testsuite/gas/aarch64/poe2-invalid-2.d b/gas/testsuite/gas/aarch64/poe2-invalid-2.d new file mode 100644 index 00000000000..e6ac680b2a3 --- /dev/null +++ b/gas/testsuite/gas/aarch64/poe2-invalid-2.d @@ -0,0 +1,4 @@ +#name: TCHANGE instructions without +poe2 flag. +#source: poe2.s +#as: -march=armv8-a +#error_output: poe2-invalid-2.l diff --git a/gas/testsuite/gas/aarch64/poe2-invalid-2.l b/gas/testsuite/gas/aarch64/poe2-invalid-2.l new file mode 100644 index 00000000000..c88442521be --- /dev/null +++ b/gas/testsuite/gas/aarch64/poe2-invalid-2.l @@ -0,0 +1,61 @@ +.*: Assembler messages: +.*: Error: selected processor does not support `tchangef x0,x1' +.*: Error: selected processor does not support `tchangef x1,x3' +.*: Error: selected processor does not support `tchangef x3,x7' +.*: Error: selected processor does not support `tchangef x7,x15' +.*: Error: selected processor does not support `tchangef x15,x30' +.*: Error: selected processor does not support `tchangef x30,x0' +.*: Error: selected processor does not support `tchangef x10,x5' +.*: Error: selected processor does not support `tchangef x0,x1,nb' +.*: Error: selected processor does not support `tchangef x1,x3,nb' +.*: Error: selected processor does not support `tchangef x3,x7,nb' +.*: Error: selected processor does not support `tchangef x7,x15,nb' +.*: Error: selected processor does not support `tchangef x15,x30,NB' +.*: Error: selected processor does not support `tchangef x30,x0,nb' +.*: Error: selected processor does not support `tchangef x10,x5,NB' +.*: Error: selected processor does not support `tchangef x0,#0' +.*: Error: selected processor does not support `tchangef x0,#1' +.*: Error: selected processor does not support `tchangef x1,#3' +.*: Error: selected processor does not support `tchangef x3,#7' +.*: Error: selected processor does not support `tchangef x7,#15' +.*: Error: selected processor does not support `tchangef x15,#31' +.*: Error: selected processor does not support `tchangef x30,#63' +.*: Error: selected processor does not support `tchangef x10,#127' +.*: Error: selected processor does not support `tchangef x0,#0,nb' +.*: Error: selected processor does not support `tchangef x0,#1,nb' +.*: Error: selected processor does not support `tchangef x1,#3,nb' +.*: Error: selected processor does not support `tchangef x3,#7,nb' +.*: Error: selected processor does not support `tchangef x7,#15,nb' +.*: Error: selected processor does not support `tchangef x15,#31,NB' +.*: Error: selected processor does not support `tchangef x30,#63,nb' +.*: Error: selected processor does not support `tchangef x10,#127,NB' +.*: Error: selected processor does not support `tchangeb x0,x1' +.*: Error: selected processor does not support `tchangeb x1,x3' +.*: Error: selected processor does not support `tchangeb x3,x7' +.*: Error: selected processor does not support `tchangeb x7,x15' +.*: Error: selected processor does not support `tchangeb x15,x30' +.*: Error: selected processor does not support `tchangeb x30,x0' +.*: Error: selected processor does not support `tchangeb x10,x5' +.*: Error: selected processor does not support `tchangeb x0,x1,nb' +.*: Error: selected processor does not support `tchangeb x1,x3,nb' +.*: Error: selected processor does not support `tchangeb x3,x7,nb' +.*: Error: selected processor does not support `tchangeb x7,x15,nb' +.*: Error: selected processor does not support `tchangeb x15,x30,NB' +.*: Error: selected processor does not support `tchangeb x30,x0,nb' +.*: Error: selected processor does not support `tchangeb x10,x5,NB' +.*: Error: selected processor does not support `tchangeb x0,#0' +.*: Error: selected processor does not support `tchangeb x0,#1' +.*: Error: selected processor does not support `tchangeb x1,#3' +.*: Error: selected processor does not support `tchangeb x3,#7' +.*: Error: selected processor does not support `tchangeb x7,#15' +.*: Error: selected processor does not support `tchangeb x15,#31' +.*: Error: selected processor does not support `tchangeb x30,#63' +.*: Error: selected processor does not support `tchangeb x10,#127' +.*: Error: selected processor does not support `tchangeb x0,#0,nb' +.*: Error: selected processor does not support `tchangeb x0,#1,nb' +.*: Error: selected processor does not support `tchangeb x1,#3,nb' +.*: Error: selected processor does not support `tchangeb x3,#7,nb' +.*: Error: selected processor does not support `tchangeb x7,#15,nb' +.*: Error: selected processor does not support `tchangeb x15,#31,NB' +.*: Error: selected processor does not support `tchangeb x30,#63,nb' +.*: Error: selected processor does not support `tchangeb x10,#127,NB' diff --git a/gas/testsuite/gas/aarch64/poe2.d b/gas/testsuite/gas/aarch64/poe2.d new file mode 100644 index 00000000000..709565729e1 --- /dev/null +++ b/gas/testsuite/gas/aarch64/poe2.d @@ -0,0 +1,69 @@ +#objdump: -dr +#as: -march=armv8-a+poe2 + +[^:]+: file format .* + + +[^:]+: + +[^:]+: +.*: d5800020 tchangef x0, x1 +.*: d5800061 tchangef x1, x3 +.*: d58000e3 tchangef x3, x7 +.*: d58001e7 tchangef x7, x15 +.*: d58003cf tchangef x15, x30 +.*: d580001e tchangef x30, x0 +.*: d58000aa tchangef x10, x5 +.*: d5820020 tchangef x0, x1, nb +.*: d5820061 tchangef x1, x3, nb +.*: d58200e3 tchangef x3, x7, nb +.*: d58201e7 tchangef x7, x15, nb +.*: d58203cf tchangef x15, x30, nb +.*: d582001e tchangef x30, x0, nb +.*: d58200aa tchangef x10, x5, nb +.*: d5900000 tchangef x0, #0x0 +.*: d5900020 tchangef x0, #0x1 +.*: d5900061 tchangef x1, #0x3 +.*: d59000e3 tchangef x3, #0x7 +.*: d59001e7 tchangef x7, #0xf +.*: d59003ef tchangef x15, #0x1f +.*: d59007fe tchangef x30, #0x3f +.*: d5900fea tchangef x10, #0x7f +.*: d5920000 tchangef x0, #0x0, nb +.*: d5920020 tchangef x0, #0x1, nb +.*: d5920061 tchangef x1, #0x3, nb +.*: d59200e3 tchangef x3, #0x7, nb +.*: d59201e7 tchangef x7, #0xf, nb +.*: d59203ef tchangef x15, #0x1f, nb +.*: d59207fe tchangef x30, #0x3f, nb +.*: d5920fea tchangef x10, #0x7f, nb +.*: d5840020 tchangeb x0, x1 +.*: d5840061 tchangeb x1, x3 +.*: d58400e3 tchangeb x3, x7 +.*: d58401e7 tchangeb x7, x15 +.*: d58403cf tchangeb x15, x30 +.*: d584001e tchangeb x30, x0 +.*: d58400aa tchangeb x10, x5 +.*: d5860020 tchangeb x0, x1, nb +.*: d5860061 tchangeb x1, x3, nb +.*: d58600e3 tchangeb x3, x7, nb +.*: d58601e7 tchangeb x7, x15, nb +.*: d58603cf tchangeb x15, x30, nb +.*: d586001e tchangeb x30, x0, nb +.*: d58600aa tchangeb x10, x5, nb +.*: d5940000 tchangeb x0, #0x0 +.*: d5940020 tchangeb x0, #0x1 +.*: d5940061 tchangeb x1, #0x3 +.*: d59400e3 tchangeb x3, #0x7 +.*: d59401e7 tchangeb x7, #0xf +.*: d59403ef tchangeb x15, #0x1f +.*: d59407fe tchangeb x30, #0x3f +.*: d5940fea tchangeb x10, #0x7f +.*: d5960000 tchangeb x0, #0x0, nb +.*: d5960020 tchangeb x0, #0x1, nb +.*: d5960061 tchangeb x1, #0x3, nb +.*: d59600e3 tchangeb x3, #0x7, nb +.*: d59601e7 tchangeb x7, #0xf, nb +.*: d59603ef tchangeb x15, #0x1f, nb +.*: d59607fe tchangeb x30, #0x3f, nb +.*: d5960fea tchangeb x10, #0x7f, nb diff --git a/gas/testsuite/gas/aarch64/poe2.s b/gas/testsuite/gas/aarch64/poe2.s new file mode 100644 index 00000000000..3b9353c5c98 --- /dev/null +++ b/gas/testsuite/gas/aarch64/poe2.s @@ -0,0 +1,75 @@ +#TCHANGEF (register) instructions + tchangef x0, x1 + tchangef x1, x3 + tchangef x3, x7 + tchangef x7, x15 + tchangef x15, x30 + tchangef x30, x0 + tchangef x10, x5 + +#TCHANGEF (register) instructions with not_balanced + tchangef x0, x1, nb + tchangef x1, x3, nb + tchangef x3, x7, nb + tchangef x7, x15, nb + tchangef x15, x30, NB + tchangef x30, x0, nb + tchangef x10, x5, NB + +#TCHANGEF (immediate) instructions + tchangef x0, #0 + tchangef x0, #1 + tchangef x1, #3 + tchangef x3, #7 + tchangef x7, #15 + tchangef x15, #31 + tchangef x30, #63 + tchangef x10, #127 + +#TCHANGEF (immediate) instructions with not_balanced + tchangef x0, #0, nb + tchangef x0, #1, nb + tchangef x1, #3, nb + tchangef x3, #7, nb + tchangef x7, #15, nb + tchangef x15, #31, NB + tchangef x30, #63, nb + tchangef x10, #127, NB + +#TCHANGEB (register) instructions + tchangeb x0, x1 + tchangeb x1, x3 + tchangeb x3, x7 + tchangeb x7, x15 + tchangeb x15, x30 + tchangeb x30, x0 + tchangeb x10, x5 + +#TCHANGEB (register) instructions with not_balanced + tchangeb x0, x1, nb + tchangeb x1, x3, nb + tchangeb x3, x7, nb + tchangeb x7, x15, nb + tchangeb x15, x30, NB + tchangeb x30, x0, nb + tchangeb x10, x5, NB + +#TCHANGEB (immediate) instructions + tchangeb x0, #0 + tchangeb x0, #1 + tchangeb x1, #3 + tchangeb x3, #7 + tchangeb x7, #15 + tchangeb x15, #31 + tchangeb x30, #63 + tchangeb x10, #127 + +#TCHANGEB (immediate) instructions with not_balanced + tchangeb x0, #0, nb + tchangeb x0, #1, nb + tchangeb x1, #3, nb + tchangeb x3, #7, nb + tchangeb x7, #15, nb + tchangeb x15, #31, NB + tchangeb x30, #63, nb + tchangeb x10, #127, NB diff --git a/include/opcode/aarch64.h b/include/opcode/aarch64.h index e65b61c3f9c..d4d2fab5d11 100644 --- a/include/opcode/aarch64.h +++ b/include/opcode/aarch64.h @@ -263,6 +263,8 @@ enum aarch64_feature_bit { AARCH64_FEATURE_SME_TMOP, /* SME MOP4 instructions. */ AARCH64_FEATURE_SME_MOP4, + /* POE2 instructions. */ + AARCH64_FEATURE_S1POE2, /* Virtual features. These are used to gate instructions that are enabled by either of two (or more) sets of command line flags. */ @@ -673,6 +675,7 @@ enum aarch64_opnd AARCH64_OPND_UNDEFINED,/* imm16 operand in undefined instruction. */ AARCH64_OPND_CCMP_IMM,/* Immediate in conditional compare instructions. */ AARCH64_OPND_SIMM5, /* 5-bit signed immediate in the imm5 field. */ + AARCH64_OPND_NOT_BALANCED, /* a 1-bit not_balanced optional operand. */ AARCH64_OPND_NZCV, /* Flag bit specifier giving an alternative value for each condition flag. */ @@ -1132,6 +1135,7 @@ enum aarch64_insn_class lse128_atomic, movewide, pcreladdr, + s1poe2, ic_system, sme_fp_sd, sme_int_sd, @@ -1599,6 +1603,7 @@ struct aarch64_name_value_pair }; extern const struct aarch64_name_value_pair aarch64_operand_modifiers []; +extern const struct aarch64_name_value_pair aarch64_nb_options [1]; extern const struct aarch64_name_value_pair aarch64_barrier_options [16]; extern const struct aarch64_name_value_pair aarch64_barrier_dsb_nxs_options [4]; extern const struct aarch64_name_value_pair aarch64_prfops [32]; diff --git a/opcodes/aarch64-asm-2.c b/opcodes/aarch64-asm-2.c index b0611654ead..c93447742f8 100644 --- a/opcodes/aarch64-asm-2.c +++ b/opcodes/aarch64-asm-2.c @@ -930,6 +930,7 @@ aarch64_insert_operand (const aarch64_operand *self, case AARCH64_OPND_UNDEFINED: case AARCH64_OPND_CCMP_IMM: case AARCH64_OPND_SIMM5: + case AARCH64_OPND_NOT_BALANCED: case AARCH64_OPND_NZCV: case AARCH64_OPND_ADDR_PCREL9: case AARCH64_OPND_ADDR_PCREL14: diff --git a/opcodes/aarch64-dis-2.c b/opcodes/aarch64-dis-2.c index ecaea2d2fdb..657e1ec4f37 100644 --- a/opcodes/aarch64-dis-2.c +++ b/opcodes/aarch64-dis-2.c @@ -26541,28 +26541,68 @@ aarch64_opcode_lookup_1 (uint32_t word) { if (((word >> 22) & 0x1) == 0) { - if (((word >> 25) & 0x1) == 0) + if (((word >> 23) & 0x1) == 0) { - /* 33222222222211111111110000000000 - 10987654321098765432109876543210 - x1010101x00xxxxxxxxxxxxxxxxxxxxx. */ - return A64_OPID_d500403f_xaflag; + if (((word >> 25) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x1010101000xxxxxxxxxxxxxxxxxxxxx. */ + return A64_OPID_d500403f_xaflag; + } + else + { + if (((word >> 10) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x1010111000xxxxxxxxxx0xxxxxxxxxx. */ + return A64_OPID_d71f0800_braa_Rn_Rd_SP; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x1010111000xxxxxxxxxx1xxxxxxxxxx. */ + return A64_OPID_d71f0c00_brab_Rn_Rd_SP; + } + } } else { - if (((word >> 10) & 0x1) == 0) + if (((word >> 18) & 0x1) == 0) { - /* 33222222222211111111110000000000 - 10987654321098765432109876543210 - x1010111x00xxxxxxxxxx0xxxxxxxxxx. */ - return A64_OPID_d71f0800_braa_Rn_Rd_SP; + if (((word >> 20) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x10101x11000x0xxxxxxxxxxxxxxxxxx. */ + return A64_OPID_d5800000_tchangef_Rd_Rn_NOT_BALANCED; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x10101x11001x0xxxxxxxxxxxxxxxxxx. */ + return A64_OPID_d5900000_tchangef_Rd_UIMM7_NOT_BALANCED; + } } else { - /* 33222222222211111111110000000000 - 10987654321098765432109876543210 - x1010111x00xxxxxxxxxx1xxxxxxxxxx. */ - return A64_OPID_d71f0c00_brab_Rn_Rd_SP; + if (((word >> 20) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x10101x11000x1xxxxxxxxxxxxxxxxxx. */ + return A64_OPID_d5840000_tchangeb_Rd_Rn_NOT_BALANCED; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x10101x11001x1xxxxxxxxxxxxxxxxxx. */ + return A64_OPID_d5940000_tchangeb_Rd_UIMM7_NOT_BALANCED; + } } } } @@ -37357,6 +37397,7 @@ aarch64_extract_operand (const aarch64_operand *self, case AARCH64_OPND_UNDEFINED: case AARCH64_OPND_CCMP_IMM: case AARCH64_OPND_SIMM5: + case AARCH64_OPND_NOT_BALANCED: case AARCH64_OPND_NZCV: case AARCH64_OPND_ADDR_ADRP: case AARCH64_OPND_ADDR_PCREL9: diff --git a/opcodes/aarch64-opc-2.c b/opcodes/aarch64-opc-2.c index 7f3b25eae38..fc88fe82ed3 100644 --- a/opcodes/aarch64-opc-2.c +++ b/opcodes/aarch64-opc-2.c @@ -104,6 +104,7 @@ const struct aarch64_operand aarch64_operands[] = {AARCH64_OPND_CLASS_IMMEDIATE, "UNDEFINED", OPD_F_HAS_INSERTER | OPD_F_HAS_EXTRACTOR, {FLD_imm16_0}, "a 16-bit unsigned immediate"}, {AARCH64_OPND_CLASS_IMMEDIATE, "CCMP_IMM", OPD_F_HAS_INSERTER | OPD_F_HAS_EXTRACTOR, {FLD_imm5}, "a 5-bit unsigned immediate"}, {AARCH64_OPND_CLASS_IMMEDIATE, "SIMM5", OPD_F_SEXT | OPD_F_HAS_INSERTER | OPD_F_HAS_EXTRACTOR, {FLD_imm5}, "a 5-bit signed immediate"}, + {AARCH64_OPND_CLASS_IMMEDIATE, "NOT_BALANCED", OPD_F_HAS_INSERTER | OPD_F_HAS_EXTRACTOR, {FLD_imm1_17}, "a 1-bit not_balanced optional operand"}, {AARCH64_OPND_CLASS_IMMEDIATE, "NZCV", OPD_F_HAS_INSERTER | OPD_F_HAS_EXTRACTOR, {FLD_nzcv}, "a flag bit specifier giving an alternative value for each flag"}, {AARCH64_OPND_CLASS_IMMEDIATE, "LIMM", OPD_F_HAS_INSERTER | OPD_F_HAS_EXTRACTOR, {FLD_N,FLD_immr,FLD_imms}, "Logical immediate"}, {AARCH64_OPND_CLASS_IMMEDIATE, "AIMM", OPD_F_HAS_INSERTER | OPD_F_HAS_EXTRACTOR, {FLD_shift,FLD_imm12}, "a 12-bit unsigned immediate with optional left shift of 12 bits"}, diff --git a/opcodes/aarch64-opc.c b/opcodes/aarch64-opc.c index b074765920e..fbefdd01933 100644 --- a/opcodes/aarch64-opc.c +++ b/opcodes/aarch64-opc.c @@ -361,6 +361,7 @@ const aarch64_field aarch64_fields[] = AARCH64_FIELD (14, 1), /* imm1_14: general immediate in bits [14]. */ AARCH64_FIELD (15, 1), /* imm1_15: general immediate in bits [15]. */ AARCH64_FIELD (16, 1), /* imm1_16: general immediate in bits [16]. */ + AARCH64_FIELD (17, 1), /* imm1_17: op1[0] in the TCHANGE instruction. */ AARCH64_FIELD ( 0, 2), /* imm2_0: general immediate in bits [1:0]. */ AARCH64_FIELD ( 1, 2), /* imm2_1: general immediate in bits [2:1]. */ AARCH64_FIELD ( 2, 2), /* imm2_2: general immediate in bits [3:2]. */ @@ -559,6 +560,11 @@ aarch64_shift_operator_p (enum aarch64_modifier_kind kind) return kind >= AARCH64_MOD_ROR && kind <= AARCH64_MOD_LSL; } +const struct aarch64_name_value_pair aarch64_nb_options[1] = +{ + { "nb", 1 }, +}; + const struct aarch64_name_value_pair aarch64_barrier_options[16] = { { "#0x00", 0x0 }, @@ -5145,6 +5151,11 @@ aarch64_print_operand (char *buf, size_t size, bfd_vma pc, snprintf (buf, size, "%s", style_sub_mnem (styler, "dsync")); break; + case AARCH64_OPND_NOT_BALANCED: + if (opnd->imm.value) + snprintf (buf, size, "%s", style_sub_mnem (styler, "nb")); + break; + case AARCH64_OPND_BTI_TARGET: if ((HINT_FLAG (opnd->hint_option->value) & HINT_OPD_F_NOPRINT) == 0) snprintf (buf, size, "%s", diff --git a/opcodes/aarch64-opc.h b/opcodes/aarch64-opc.h index 5d544d53baf..376aacb8312 100644 --- a/opcodes/aarch64-opc.h +++ b/opcodes/aarch64-opc.h @@ -165,6 +165,7 @@ enum aarch64_field_kind FLD_imm1_14, FLD_imm1_15, FLD_imm1_16, + FLD_imm1_17, FLD_imm2_0, FLD_imm2_1, FLD_imm2_2, diff --git a/opcodes/aarch64-tbl-2.h b/opcodes/aarch64-tbl-2.h index 1263f1f9bd8..16b3448c828 100644 --- a/opcodes/aarch64-tbl-2.h +++ b/opcodes/aarch64-tbl-2.h @@ -3995,5 +3995,9 @@ enum aarch64_opcode_idx A64_OPID_a1c00018_usmop4s_SME_ZAda_3b_SME_Zn_6_3_SME_Zm_17_3, A64_OPID_a1c00218_usmop4s_SME_ZAda_3b_SME_Znx2_6_3_SME_Zm_17_3, A64_OPID_a1d00218_usmop4s_SME_ZAda_3b_SME_Znx2_6_3_SME_Zmx2_17_3, + A64_OPID_d5800000_tchangef_Rd_Rn_NOT_BALANCED, + A64_OPID_d5900000_tchangef_Rd_UIMM7_NOT_BALANCED, + A64_OPID_d5840000_tchangeb_Rd_Rn_NOT_BALANCED, + A64_OPID_d5940000_tchangeb_Rd_UIMM7_NOT_BALANCED, A64_OPID_MAX, }; diff --git a/opcodes/aarch64-tbl.h b/opcodes/aarch64-tbl.h index 2fc69c27791..572385621db 100644 --- a/opcodes/aarch64-tbl.h +++ b/opcodes/aarch64-tbl.h @@ -64,6 +64,12 @@ QLF2(X,NIL), \ } +/* e.g. TCHANGEF , #{, }. */ +#define QL_DST_X1 \ +{ \ + QLF3(X,NIL,NIL), \ +} + /* e.g. MRRS , , . */ #define QL_DST_X2 \ { \ @@ -2808,6 +2814,7 @@ { \ QLF3(V_4S, V_8H, S_H), \ } + /* Opcode table. */ @@ -3057,6 +3064,8 @@ static const aarch64_feature_set aarch64_feature_sme_mop4_f8f32 = AARCH64_FEATURES (2, SME_MOP4, SME_F8F32); static const aarch64_feature_set aarch64_feature_sme_mop4_i16i64 = AARCH64_FEATURES (2, SME_MOP4, SME_I16I64); +static const aarch64_feature_set aarch64_feature_s1poe2 = + AARCH64_FEATURE (S1POE2); #define CORE &aarch64_feature_v8 #define FP &aarch64_feature_fp @@ -3181,6 +3190,7 @@ static const aarch64_feature_set aarch64_feature_sme_mop4_i16i64 = #define SME_MOP4_F8F16 &aarch64_feature_sme_mop4_f8f16 #define SME_MOP4_F8F32 &aarch64_feature_sme_mop4_f8f32 #define SME_MOP4_I16I64 &aarch64_feature_sme_mop4_i16i64 +#define S1POE2 &aarch64_feature_s1poe2 #define CORE_INSN(NAME,OPCODE,MASK,CLASS,OP,OPS,QUALS,FLAGS) \ { NAME, OPCODE, MASK, CLASS, OP, CORE, OPS, QUALS, FLAGS | F_INVALID_IMM_SYMS_1, 0, 0, NULL } @@ -3510,6 +3520,8 @@ static const aarch64_feature_set aarch64_feature_sme_mop4_i16i64 = #define SME_MOP4_I16I64_INSN(NAME,OPCODE,MASK,CLASS,OPS,QUALS,FLAGS,TIED) \ { NAME, OPCODE, MASK, CLASS, 0, SME_MOP4_I16I64, OPS, QUALS, \ FLAGS | F_STRICT, 0, TIED, NULL } +#define S1POE2_INSN(NAME,OPCODE,MASK,OPS,QUALS, FLAGS) \ + { NAME, OPCODE, MASK, s1poe2, 0, S1POE2, OPS, QUALS, FLAGS | F_INVALID_IMM_SYMS_1, 0, 0, NULL } #define MOPS_CPY_OP1_OP2_PME_INSN(NAME, OPCODE, MASK, FLAGS, CONSTRAINTS) \ MOPS_INSN (NAME, OPCODE, MASK, 0, \ @@ -7738,6 +7750,12 @@ const struct aarch64_opcode aarch64_opcode_table[] = SME_MOP4_I16I64_INSN ("usmop4s", 0xa1c00218, 0xfff1fe38, sme_misc, OP3 (SME_ZAda_3b, SME_Znx2_6_3, SME_Zm_17_3), OP_SVE_DHH, 0, 0), SME_MOP4_I16I64_INSN ("usmop4s", 0xa1d00218, 0xfff1fe38, sme_misc, OP3 (SME_ZAda_3b, SME_Znx2_6_3, SME_Zmx2_17_3), OP_SVE_DHH, 0, 0), + /* POE2 instructions. */ + S1POE2_INSN("tchangef", 0xd5800000, 0xfffdfc00, OP3 (Rd, Rn, NOT_BALANCED), QL_DST_X2, F_OPD2_OPT | F_DEFAULT (0x0)), + S1POE2_INSN("tchangef", 0xd5900000, 0xfffdf000, OP3 (Rd, UIMM7, NOT_BALANCED), QL_DST_X1, F_OPD2_OPT | F_DEFAULT (0x0)), + S1POE2_INSN("tchangeb", 0xd5840000, 0xfffdfc00, OP3 (Rd, Rn, NOT_BALANCED), QL_DST_X2, F_OPD2_OPT | F_DEFAULT (0x0)), + S1POE2_INSN("tchangeb", 0xd5940000, 0xfffdf000, OP3 (Rd, UIMM7, NOT_BALANCED), QL_DST_X1, F_OPD2_OPT | F_DEFAULT (0x0)), + {0, 0, 0, 0, 0, 0, {}, {}, 0, 0, 0, NULL}, }; @@ -7890,6 +7908,8 @@ const struct aarch64_opcode aarch64_opcode_table[] = "a 5-bit unsigned immediate") \ Y(IMMEDIATE, imm, "SIMM5", OPD_F_SEXT, F(FLD_imm5), \ "a 5-bit signed immediate") \ + Y(IMMEDIATE, imm, "NOT_BALANCED", 0, F(FLD_imm1_17), \ + "a 1-bit not_balanced optional operand") \ Y(IMMEDIATE, imm, "NZCV", 0, F(FLD_nzcv), \ "a flag bit specifier giving an alternative value for each flag") \ Y(IMMEDIATE, limm, "LIMM", 0, F(FLD_N,FLD_immr,FLD_imms), \