Message ID | Zg01IzY/aVWmnzV4@arm.com |
---|---|
State | Committed |
Headers |
Return-Path: <binutils-bounces+patchwork=sourceware.org@sourceware.org> 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 EB2FB3846405 for <patchwork@sourceware.org>; Wed, 3 Apr 2024 10:55:57 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2085.outbound.protection.outlook.com [40.107.8.85]) by sourceware.org (Postfix) with ESMTPS id 9F5BB38460BD for <binutils@sourceware.org>; Wed, 3 Apr 2024 10:55:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9F5BB38460BD 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 9F5BB38460BD Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.8.85 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1712141725; cv=pass; b=JJ7WseUnX/HTeKVIEWAUAisUd0Wt4OMxqM/nDngDHkmY/O6NV3nOBcC3aVFgQ1iNOtjdDB4+5cJ8wXHSyNxaoM+KxLsvmQhIH8igZM54tugWdFiX2Mabc7utAvZ/7MNLBvz+1Da+kGHmc/vXHlIi8HqFpH/z+HxYwNtKjIS2PHw= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1712141725; c=relaxed/simple; bh=tnsGHLwT72WKQDb3x8+DODl6qbErY1vi1B5SrwqGGJs=; h=DKIM-Signature:DKIM-Signature:Date:From:To:Subject:Message-ID: MIME-Version; b=eVIh+tLid/6P0bhPSsuhDVvzcaMlSolippO5kITXkLn0kydW+fmrWYE1x+w23bZMSjEBWsabfD6y/l4/Q+B50D+gbHSSMGtigx+Mk4FVQjYl+ECbyAxStEm8suoYH1dUnbSGyzJctacmczaOw9SxlPQIRx1mqaDZbmJC6KR/pek= ARC-Authentication-Results: i=3; server2.sourceware.org ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=Grwu2HsE6PgVanzg7Lp68szXYQ+QMcmFEd/U/Vpv9b3f9vDZUvGX0fNBvWF6Cm6UkmBDtjWfSnykHTSpz76+vHOCDpFBGlfjfq4CVY1WQDel+pVJnhCy7HJ1oGn3lB9a9PqYLKsa7BOyN7AGlx2CFtUIjz381SVPpt4QJtjGk2ObvoGkOuchAed9TkzOReSRR0D1/J/aZCz6evlAvwrlYs3bU6NAjkxMxcADZ1D8EEBZj6Xkow0GiNHPwvymFC44DTitQ15EKqjBM1CAbJqEUaXBqCPAKj1mPyjaPKfNTAn1q6FkNnEOTHRMtbaKRgzI3nywMPM6uU3ZMvrcyw4vfg== 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=j2SeH175KwJ/We7h01KXSYI5wf9QCaLlZhFeNIqzRzw=; b=mDoiGhERRItVs+QUXJg2zHbBJYBZSlrXAjawX4glnVnNXhKH2GKH128nV9xiP0PNsflFsc1+Ezemsz86Ic28IeYiHtFC35/YTymw6aakIFP/a8k+UseikbOTV1jyUQQU5kxOHB9hbuv/iIyBsuxUzPkr8L4QM1JnwiqrsNTADRvMhdeZx8MRNk217XoiRGDa30UcN8jp++diVvCliJclDTkiYc9K/2UR5rJMPqnvHANlw+uJmf5d5w+yMH0hPMdYOIds4Szw1jZgd954cb5n+ini2vX5yM3dzR6D82ghgzDiySu5a7bYUzdcxLor22Fd6ZAt/544Ai7UUVFGoe6XRQ== 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=j2SeH175KwJ/We7h01KXSYI5wf9QCaLlZhFeNIqzRzw=; b=rqJvwwBXdAUypEE1IgS4yB3cI/F7oSlCghyYt/rdbLKJs3XYtEgGMSdoifLWLSX04sw09y+a1QTdIz22RRRSqm2GduscCmpV5rFcUyMf1EYApnBZZK60reHsWKQj7yohOrRJOEPAx26+1Xu7QqKl3A+aNnCBhy9N+bRbaEeOfg4= Received: from DUZPR01CA0206.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b6::21) by PR3PR08MB5673.eurprd08.prod.outlook.com (2603:10a6:102:86::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Wed, 3 Apr 2024 10:55:18 +0000 Received: from DB1PEPF000509F5.eurprd02.prod.outlook.com (2603:10a6:10:4b6:cafe::5f) by DUZPR01CA0206.outlook.office365.com (2603:10a6:10:4b6::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46 via Frontend Transport; Wed, 3 Apr 2024 10:55:18 +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 DB1PEPF000509F5.mail.protection.outlook.com (10.167.242.151) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.7452.22 via Frontend Transport; Wed, 3 Apr 2024 10:55:18 +0000 Received: ("Tessian outbound 5ad6c4395be7:v300"); Wed, 03 Apr 2024 10:55:18 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 8e0b59e8d72b0496 X-CR-MTA-TID: 64aa7808 Received: from 2b8559822357.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id F333DAEB-D47D-48EB-BF7F-13FA05892382.1; Wed, 03 Apr 2024 10:53:35 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 2b8559822357.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 03 Apr 2024 10:53:35 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VVWfEL9V3HHBwCGF1Cz+8NQD+vN60tp6e/NpimD1iR1WDYUpMSZVyGvx6Bm1HTtp7dOTHlB6xLby65qn7xd99pBXabCxz0x4nYwNnwwhr3Kh10w3j5bhJn4+Pi148UBV9lEHrI4gvpdVq66r99VmcmjK3J7A6Dgv7CNKzK/fmcd6L9Ljs5jjRv98zcqmaPnxapltElh78lHfYQ0qaogWUjIWiQs2mKieqsx7JC5qKSLwBcabY72ZFumJbh6aXo+5lVfKgPKgi0Yj6x/A0mwvcomympHlhCBHvbRvq8RP1he7/atnnGHqGXPxf47MZxzU6r/eOXmD3DOePKsTLWUZWA== 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=j2SeH175KwJ/We7h01KXSYI5wf9QCaLlZhFeNIqzRzw=; b=RUX5161N/2sf9iHv1PdeHgVXbsVONGt4ANDTUG0fGFLdvrKpYe2ydOq5lexeMVKWNRsF+sYjUtAtbupYkbqOFqHgkx93fd0L5tgEL/BP9VJnfO3ExM3JFt3ok4PoOHp8KOmj1NaHtHrATLAsEe0UHJeqkfuGG0zgF62jLzNMUhhYGWgegofyqLH2nB5qpAraYX1pCXSaDmjXotUmnxuK4hiQF5NvBE7HP4ruOiTHWtbcyj8XCmgbCr8KzZLaKors1+xH/QiYfOjGg6ZJ3P2sLdSv9KcZvuA/VxeM7zYIDFNnTUCyLkLzk15yRcgZsEKmqthkPaJfrDRKIRKH0j+/WA== 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=j2SeH175KwJ/We7h01KXSYI5wf9QCaLlZhFeNIqzRzw=; b=rqJvwwBXdAUypEE1IgS4yB3cI/F7oSlCghyYt/rdbLKJs3XYtEgGMSdoifLWLSX04sw09y+a1QTdIz22RRRSqm2GduscCmpV5rFcUyMf1EYApnBZZK60reHsWKQj7yohOrRJOEPAx26+1Xu7QqKl3A+aNnCBhy9N+bRbaEeOfg4= Received: from PAWPR08MB8958.eurprd08.prod.outlook.com (2603:10a6:102:33e::15) by AS8PR08MB5878.eurprd08.prod.outlook.com (2603:10a6:20b:29b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Wed, 3 Apr 2024 10:53:27 +0000 Received: from PAWPR08MB8958.eurprd08.prod.outlook.com ([fe80::9561:db03:3f6c:5634]) by PAWPR08MB8958.eurprd08.prod.outlook.com ([fe80::9561:db03:3f6c:5634%5]) with mapi id 15.20.7409.042; Wed, 3 Apr 2024 10:53:26 +0000 Date: Wed, 3 Apr 2024 11:53:23 +0100 From: Alex Coplan <alex.coplan@arm.com> To: binutils@sourceware.org Cc: Nick Clifton <nickc@redhat.com>, Richard Earnshaw <rearnsha@arm.com> Subject: [PATCH 2/3] arm: Fix encoding of MVE vqshr[u]n Message-ID: <Zg01IzY/aVWmnzV4@arm.com> Content-Type: multipart/mixed; boundary="1iRpW5w/B7EIZ0vf" Content-Disposition: inline Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P265CA0012.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2ad::7) To PAWPR08MB8958.eurprd08.prod.outlook.com (2603:10a6:102:33e::15) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: PAWPR08MB8958:EE_|AS8PR08MB5878:EE_|DB1PEPF000509F5:EE_|PR3PR08MB5673:EE_ 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: 36a2FUcoCd2Mqz0P27hfQP3QCdUjS4eACGhvNsB43Hh0QH0tK97jvkApNzS8cXlf7akpm9vfquTsxf1HYQLGiHKtA1NXmPi9DZI9Um9C1dAwEJTOACtbk+MAku5+HM//xkstQvmSO845HA1bltJB39jar5V5MmhCwQcWAWHLehXceD0oDerVUdOvRSj+3uzW3/00Q+wA+kRb6rvVa2VNYYXLukp551ZwFJv41vAVPaKHWsioiKePeqAHhUSfMbRoBdxRyFNkKF24oYA2Do1fyq8zDRoiI7Xwz4rQTsGGCXe/NS7cE34UbaWU8bZba3dNEkmNQIkLh4OT3U4506bN9j55HFuodZQcgkgZifFBxtkkE14cRxx+a6uShAf0M1xZJY/+V7s31XveWmm4/luZky3qyXHoKT17Cgfs7W0ulLJBJ1UKqPqmo7gLB8WPIggzXqIC85UJ1yZ8Iw1TyX6eaWNw6yRlvniRiavfoAlE0N0vNaKBaD6L0X2irczTDNvKHZESxEGXeTMRXQ5enD4LsaKDmyt3RrDbq6+0rIkKqMBmXlPL2B3qb+xk3Yg0+yoPm3zA2WBfdlIIwbbQr1h2QZZ1CRhq00XWkT9X16dd9zM= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAWPR08MB8958.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366007)(1800799015)(376005); DIR:OUT; SFP:1102; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB5878 X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB1PEPF000509F5.eurprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ac3d0ead-0f32-4d15-3744-08dc53cc8d1e X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hHCsE7DxNtX5oYVukww/NKRLXRXkTXHTuXcFDhzCBtPfGZaHUDkuUzhLYdqtEQRsgwXHs686AR3sImKXGe3Gc/A4E6v4ff5+wIPg25ZwXvpvvE5z8MELHhYMHbkJZbh4iBC4WA0xcLNSMMvZoaUgVHQOg3cp6mNxO04SEizv9xxoB4lys+3usMpr99HJW8JioAMHRTzOpcA7Fu6+KaEI1i5bUWmbLV9rK5PkeiEo9XVt1MrekYO+Z2MGCR3xBLRTs57mYKamkwZ8vCFSkyzthEiAu3ztgH6feSbyZdGJpj18+juEo9OI8lk7nZWfoF/cRZCjWvxuufIMTUpyI4Uuq+cvlr9jxUB6ZWtg9Phnfi3SKXbJhklKJxszmX4ygAeXla/XYFtRuJnOygUbmSzuqi52JfU2DJAEHeqj6OQidf5eTob13J0UaGePAe8FIYUDCRJCINvibNRze/Ie6+TX/qWvhH4s9WErOKf38StXilMnMOVoMSyhfuBxw9t9laPjp4JL0wcC/rkIrmbawTSbpadaDT2cWy03MEFHuFd28WykitjrkufmE+Yo+XGHK03mxyRmCErCephu+49560Xbbi16JtyFTGhMJo+gdJqg0tMemIQb19dKB4J+N8ZglyGHP62A4D8j7q6btEgIex64t/kZGNLGSvJzO+IFMbxFIT2xVi4GCjUUHCQa5yNMuvWZ8E899NcaiVZbtqgzQCUphg== 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)(82310400014)(376005)(36860700004)(1800799015); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Apr 2024 10:55:18.5613 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ac3d0ead-0f32-4d15-3744-08dc53cc8d1e 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: DB1PEPF000509F5.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR08MB5673 X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_NONE, TXREP, 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 <binutils.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/binutils>, <mailto:binutils-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/binutils/> List-Post: <mailto:binutils@sourceware.org> List-Help: <mailto:binutils-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/binutils>, <mailto:binutils-request@sourceware.org?subject=subscribe> Errors-To: binutils-bounces+patchwork=sourceware.org@sourceware.org |
Series |
arm: Fix encoding/disassembly of MVE vq[r]shr[u]n insns
|
|
Checks
Context | Check | Description |
---|---|---|
linaro-tcwg-bot/tcwg_binutils_build--master-arm | success | Testing passed |
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 | success | Testing passed |
linaro-tcwg-bot/tcwg_binutils_check--master-aarch64 | success | Testing passed |
linaro-tcwg-bot/tcwg_binutils_check--master-arm | success | Testing passed |
Commit Message
Alex Coplan
April 3, 2024, 10:53 a.m. UTC
As it stands, these insns are incorrectly encoded as vqrshr[u]n. Concretely, the problem can be seen as follows: $ cat t.s vqrshrnb.s16 q0,q0,#8 vqshrnb.s16 q0,q0,#8 $ gas/as-new t.s -march=armv8.1-m.main+mve -o t.o $ binutils/objdump -d t.o -m armv8.1-m.main t.o: file format elf32-littlearm Disassembly of section .text: 00000000 <.text>: 0: ee88 0f41 vqrshrnb.s16 q0, q0, #0 4: ee88 0f41 vqrshrnb.s16 q0, q0, #0 Here we assemble these two instructions to the same opcode. The encoding of the first is the correct, while the encoding of the second is incorrect, and the bottom bit should be clear, see the Armv8-M ARM: https://developer.arm.com/documentation/ddi0553/latest/ There is an additional problem here in that the disassembly of the immediate is incorrect. llvm-objdump shows the correct disassembly here: t.o: file format elf32-littlearm Disassembly of section .text: 00000000 <$t>: 0: ee88 0f41 vqrshrnb.s16 q0, q0, #8 4: ee88 0f41 vqrshrnb.s16 q0, q0, #8 Note that we defer adding a test for the correct encoding of these insns until the next patch which fixes the disassembly issue. --- gas/config/tc-arm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 3bbb75c169a..89c85745adc 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -26621,10 +26621,10 @@ static const struct asm_opcode insns[] = mCEF(vshrnb, _vshrnb, 3, (RMQ, RMQ, I32z), mve_vshrn), mCEF(vrshrnt, _vrshrnt, 3, (RMQ, RMQ, I32z), mve_vshrn), mCEF(vrshrnb, _vrshrnb, 3, (RMQ, RMQ, I32z), mve_vshrn), - mCEF(vqshrnt, _vqrshrnt, 3, (RMQ, RMQ, I32z), mve_vshrn), - mCEF(vqshrnb, _vqrshrnb, 3, (RMQ, RMQ, I32z), mve_vshrn), - mCEF(vqshrunt, _vqrshrunt, 3, (RMQ, RMQ, I32z), mve_vshrn), - mCEF(vqshrunb, _vqrshrunb, 3, (RMQ, RMQ, I32z), mve_vshrn), + mCEF(vqshrnt, _vqshrnt, 3, (RMQ, RMQ, I32z), mve_vshrn), + mCEF(vqshrnb, _vqshrnb, 3, (RMQ, RMQ, I32z), mve_vshrn), + mCEF(vqshrunt, _vqshrunt, 3, (RMQ, RMQ, I32z), mve_vshrn), + mCEF(vqshrunb, _vqshrunb, 3, (RMQ, RMQ, I32z), mve_vshrn), mCEF(vqrshrnt, _vqrshrnt, 3, (RMQ, RMQ, I32z), mve_vshrn), mCEF(vqrshrnb, _vqrshrnb, 3, (RMQ, RMQ, I32z), mve_vshrn), mCEF(vqrshrunt, _vqrshrunt, 3, (RMQ, RMQ, I32z), mve_vshrn),