From patchwork Thu Oct 5 15:47:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrea Corallo X-Patchwork-Id: 148815 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2016:b0:403:3b70:6f57 with SMTP id fe22csp390849vqb; Thu, 5 Oct 2023 08:49:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF2vIUxPxLfAhJfCcLR98b/ZOUDV3NBOeF7XcV+EDOdRTusskIAQ5b2n9X8TSl+BlClJzUU X-Received: by 2002:a17:907:2cd7:b0:9b9:f28a:f864 with SMTP id hg23-20020a1709072cd700b009b9f28af864mr912819ejc.64.1696520977647; Thu, 05 Oct 2023 08:49:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1696520977; cv=pass; d=google.com; s=arc-20160816; b=VlYK9qOSb3hT6WeAUCRS2ujmwgSMjzG9SutiioiMQYSXAuoh7JCKyb1/IUSMjFKQ3p VUlio6Y4EHnM0qX+8QSP0aypbJ5INHhBZk6OFYWnLffRxScUAFo25PtJyhtQLK+kNjNt bDVwHDzq/TprgNAYKYCVlAeZxPjoTK//eS5n4ZtRyGvm8KvjCe+R+EPoFm+WdypjAaUu Wl2hQKIr/+BSyyOltcn2PCzTe4BG/hOtuhnm2NQkcCBkxeLNfVtozdat276VeRn1tzF5 icPEaOBVXyS+Y1H3gWbFKsNwSotrEsPPuG07gtMu4bvJusUdRWrkcjtAxrEbnVytNsMs wH6A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:nodisclaimer :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature:dkim-signature:dmarc-filter:delivered-to; bh=loiVNiH/HQXgyOs0fqxEsM6r7qypT6vvnsoytzZ0E2M=; fh=D/SEoDt/jD6V+/66Bn7pYOi/bPXdZfBgoKON5U2sX/I=; b=CuxG3gaWFFBkJubOb54QMqDLxhYGSDs7Ve6F0kQSvrcQ9rXdbdE7hUQzrUOXSlYPIS zO/3s5RVupUa8L/HUo0E+WIUJZk5oxlo7M2Oj3qI+uvdGH53ImO9Y1YkAfrmHlnqqosv W+tGEVmsVhFH3ZVpLFPG+uh0LGjsXM6rkv+zCByH2bkw0mDyPHgKBnmscC0m7gmBGKaZ vFCy7Zb3IX7/9VF4cunNLKacFib2GH1dgJ/j3b35INNZPMdqOyS0nHe9n0wW2zzX4ebX pt/riYurpojXf6rQ7YVqXXRK2Pcl/Wr5LXZnLLoDsCnGQASxERpCia/n6oCBRHOY6nQU 6PYQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=ERUt0o7q; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=ERUt0o7q; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id kb9-20020a1709070f8900b00987b20b66bbsi818749ejc.711.2023.10.05.08.49.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 08:49:37 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=ERUt0o7q; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=ERUt0o7q; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9FE2F3830B6E for ; Thu, 5 Oct 2023 15:49:29 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2057.outbound.protection.outlook.com [40.107.241.57]) by sourceware.org (Postfix) with ESMTPS id A7F49385773C for ; Thu, 5 Oct 2023 15:48:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A7F49385773C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=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=loiVNiH/HQXgyOs0fqxEsM6r7qypT6vvnsoytzZ0E2M=; b=ERUt0o7qinAbxElJgye9PJPBvsY3Vwk+AW0mwVc8yuxr09xRGcbRRxy37q65DreZSQ/rWtjDZN8FqC8RSLvABxyyODbG/OrWCsTWQ59PhVcDbWPnv88P0BqFLTGfStjVkYcBFDeDlOIKM1RH1sRq9AzpeTrm55do7CFbJWdAfqY= Received: from DB3PR06CA0036.eurprd06.prod.outlook.com (2603:10a6:8:1::49) by DBBPR08MB6188.eurprd08.prod.outlook.com (2603:10a6:10:1f6::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.33; Thu, 5 Oct 2023 15:48:54 +0000 Received: from DBAEUR03FT032.eop-EUR03.prod.protection.outlook.com (2603:10a6:8:1:cafe::8f) by DB3PR06CA0036.outlook.office365.com (2603:10a6:8:1::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.29 via Frontend Transport; Thu, 5 Oct 2023 15:48:54 +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 DBAEUR03FT032.mail.protection.outlook.com (100.127.142.185) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.26 via Frontend Transport; Thu, 5 Oct 2023 15:48:54 +0000 Received: ("Tessian outbound 9aeaca65ec26:v211"); Thu, 05 Oct 2023 15:48:54 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: a8c6548ee3a2f9ba X-CR-MTA-TID: 64aa7808 Received: from 62611a5f6102.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 32F83DE2-17EA-428A-9348-60C8D2161EF1.1; Thu, 05 Oct 2023 15:48:07 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 62611a5f6102.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 05 Oct 2023 15:48:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G7KhuQdb1wftKc7PSI8xDGZdi/5rlWDXiivkU9EbT2sK2ZYBBA2l+Zxdykv/GET/O5/XOSjgvB19/nV/s9QMgfwnqR7XiNiBLNbYd2/Nb0NUUNa0juseRRlXZqJkH7mHFTujBnigFY2H2/KS27/pnNNowxSnmTCrhrqvp+rD9GDMsWBNk/YvcSXlahU+Q7SnVMn4VytI3wmB78YT4e52WGA2QAfN+wvjuQp0DeF6HF0xG3oVpjKld6uZDbFiLuom1WVNhsZEvtzI9Z+cVLVUNOYQNxEMjufK9BYpZesQeiBEpVMySdJ8Eg5UNReOtDc5cmSjykEv8qO1er4uW83VoA== 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=loiVNiH/HQXgyOs0fqxEsM6r7qypT6vvnsoytzZ0E2M=; b=TkKeNzhZa65q6f0dvS0R74SjtvauhEGp9BfSELYhbZdcqBtIL94/rpPybB3PHYea5/Qdua3Yp09X6L8w6+rb2PW66mF41/axQX05rm0xwXQj3Fw9ihjs1mJwnVcmhiYisbbwKQM8sOhmmztlugkMziin1eE5RCr+c1DXbyjHvL4EJDNna7MCN2+gRkFURhNpoRZOHePvPQJzSSojRYWSb67YWsO1XJQoPibOtuxAmpICvS81I/hmQY3MlhR3JQbAcicNUIpFhyNzuLRpFAYXJzcAKp2WrJYB4TY4cDVzIyHRPBFgi7U77EBP1hQEDskT5neHaAkbLm2qc8463GExUg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=gcc.gnu.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 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=loiVNiH/HQXgyOs0fqxEsM6r7qypT6vvnsoytzZ0E2M=; b=ERUt0o7qinAbxElJgye9PJPBvsY3Vwk+AW0mwVc8yuxr09xRGcbRRxy37q65DreZSQ/rWtjDZN8FqC8RSLvABxyyODbG/OrWCsTWQ59PhVcDbWPnv88P0BqFLTGfStjVkYcBFDeDlOIKM1RH1sRq9AzpeTrm55do7CFbJWdAfqY= Received: from DB8PR09CA0001.eurprd09.prod.outlook.com (2603:10a6:10:a0::14) by DU0PR08MB8930.eurprd08.prod.outlook.com (2603:10a6:10:465::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.28; Thu, 5 Oct 2023 15:48:04 +0000 Received: from DBAEUR03FT013.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:a0:cafe::48) by DB8PR09CA0001.outlook.office365.com (2603:10a6:10:a0::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.37 via Frontend Transport; Thu, 5 Oct 2023 15:48:04 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) 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 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (40.67.248.234) by DBAEUR03FT013.mail.protection.outlook.com (100.127.142.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6863.28 via Frontend Transport; Thu, 5 Oct 2023 15:48:04 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Thu, 5 Oct 2023 15:48:03 +0000 Received: from e124257.nice.arm.com (10.34.101.64) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.27 via Frontend Transport; Thu, 5 Oct 2023 15:48:03 +0000 From: Andrea Corallo To: CC: , , , Andrea Corallo Subject: [committed] contrib: add mdcompact Date: Thu, 5 Oct 2023 17:47:45 +0200 Message-ID: <20231005154745.2663497-1-andrea.corallo@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DBAEUR03FT013:EE_|DU0PR08MB8930:EE_|DBAEUR03FT032:EE_|DBBPR08MB6188:EE_ X-MS-Office365-Filtering-Correlation-Id: af4788df-a2dd-4aaf-28ea-08dbc5ba9418 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: XknVXAn7tlceie57gnuen9AKs0gFdfllHCFGQcRwMM7ooKSwQ+jMsSOhqW2p0y4PRVB7jLj53mDNyMYvlgxZwv170XlYmqFIJr8soH42eMpi6/95frm88NehigwzadooozKEw5M1XqkGBT5tQIYJKISiJrSyVVKMSy8ODX7iykIvZToahPPXX+4jUJTw00E0G9CK85BFkXud9P2h72lZGMev1qDcUI4L/OziC712n0EKqeYATp7EA8pZwdQyWgCRwn3g4mW81pfYHmjKiL2FqwOoiDhowfcGEt+t7U39oZdO4ml2nzkIB/54hXCYZlvgC24z/G8C1XgLr3VTQtpNeSrU8cTNbLclJ7U1eNHcgwi5DyRfLJgyWJEcMiVnOWSfMWAPNlITWOXLbch/9vfB5udTTPRBhLRapiuH+PvYD60a1YsHzr+42AMH80gEKhiDEvdIXFekNwLH/HNOF4Y4qcIu0x86z5n/bHhIGU6rce2i8bCzOw9zy1tk7CvFL6sP5nbj2wQdhVoStzGyD6LX3VeWcBMtCgN1t8p1Tm0CFYh3VpB2mhAyBU6+sPM+9Gl+qhG7UxWQXNB49wpj4ZfLN9bYKAR493eUSuoZyOV+vwcXg+fAV83UJSV5UIloM7SWNVkRZJwJVXfTZNW9I5OhASi39xWZglw0PBEjLjoCKXFdvbDilqB2z/YV5BcfHQ+uEe9RgE262PCiqbwl4ceJsJ7VJF/DSjwlkpTUY7mdBEzc6cH0PXWaB0vmBY818t2/TgokjlqbvCUdYGnNfnVF8O35PuflO/pdESGMM+fa6+5ACZPWssTQwHERN3BHOErzNiL3jgMCzUN3ukWbdE330oHRBzvqulbVrL+oQydPXQ8= X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(4636009)(376002)(396003)(39860400002)(346002)(136003)(230922051799003)(82310400011)(1800799009)(186009)(64100799003)(451199024)(46966006)(40470700004)(36840700001)(54906003)(40460700003)(316002)(6916009)(41300700001)(7696005)(81166007)(26005)(2616005)(1076003)(36756003)(426003)(478600001)(336012)(86362001)(356005)(83380400001)(47076005)(82740400003)(6666004)(36860700001)(40480700001)(70206006)(70586007)(8676002)(30864003)(2906002)(8936002)(4326008)(5660300002)(44832011)(7448465001)(2004002)(36900700001); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB8930 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT032.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 4fb44da2-736f-44c2-09e2-08dbc5ba7679 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Bqx8FxJm3KssX8PLZ9/0szvLPbvDWhCMGWgX4CESVy24aWh+6RH6Dp3ZdL/PJ6doqN7207DFWd12Tk8THWG2+/OiX1mzsrIlQqteb3NN9L8hKwV0CtpvKmiK1VBEGr2wIp9CAQ/2eckmC0Ez2oqScfvj2+TiaGi7kIiS27KscToSCtNf10IwCU6EGkBfKyW1VXJOcEoe36dhfm8W1xkWZcdCa7RDKhbRbqmtppFqwVXs6XVrG2GLEcO4RduacUjAQQqrAZxz2I1qNawDpm0ORo5FljyZO2x4sj4klOfZA1AKy3xP4876pGeui9Uw828t4E6HdwqArMA1htaAFnNUx/+FPxzDGfQZgegakCVW/pzS5ZZr1m4DYUtunGlNqWv1whwbGNHi9y5w4vI++fl8zmadDFX0uPo86ngrlOEAHm1GIIBu2xzWSlYL08pRYfPhl5jTlJcaZODq41vgL+4zXm4ovP2Q/a/oftKtZW8Jj9Mz1pqfE5odmhy98zT8VvffuCSRrgjb7iL3/H+gn3ezrfbAi9ul1PlUC2Cft+hSUlYrqgiXhcggeAByKKrBCgjTMuxXr1ygX25y2nAC0rFLEv2XPf7QiROqP3bon5MXVPAGN0/Prw0kS5mK9rEE/fcFWOTXG018mUqwxBAi3qKrn0SM4NbdnMchHP+62YHGRhcHd47+9Yv/c5+JqUqhtMJZlL7BoNgyDcyol/JaZWPQqCapgNhwhzzbkcCGkcskcJBCld0U7Fa+sPGIeDXfK134FxuUHDQxwO2RFgAeEVpYW0Wjc3nmRNJ+j2vbA9WDc2bfmKmJc+tX6I0vUKdQ1DtH 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)(4636009)(346002)(396003)(376002)(39860400002)(136003)(230922051799003)(451199024)(1800799009)(82310400011)(186009)(64100799003)(40470700004)(36840700001)(46966006)(83380400001)(40460700003)(36860700001)(54906003)(8676002)(336012)(47076005)(86362001)(70206006)(70586007)(426003)(40480700001)(1076003)(4326008)(30864003)(36756003)(6916009)(316002)(2906002)(81166007)(82740400003)(5660300002)(8936002)(41300700001)(26005)(44832011)(2616005)(7696005)(6666004)(478600001)(7448465001)(2004002); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Oct 2023 15:48:54.2101 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: af4788df-a2dd-4aaf-28ea-08dbc5ba9418 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: DBAEUR03FT032.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB6188 X-Spam-Status: No, score=-11.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_NONE, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SCC_5_SHORT_WORD_LINES, 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: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778931180754089324 X-GMAIL-MSGID: 1778931180754089324 Hello all, this patch checks in mdcompact, the tool written in elisp that I used to mass convert all the multi choice pattern in the aarch64 back-end to the new compact syntax. I tested it on Emacs 29 (might run on older versions as well not sure), also I verified it runs cleanly on a few other back-ends (arm, loongarch). The tool can be used to convert a single pattern, an open buffer or all md files in a directory. The tool might need further adjustment to run on some specific back-end, in case very happy to help. This patch was pre-approved here [1]. Best Regards Andrea Corallo [1] contrib/ChangeLog * mdcompact/mdcompact-testsuite.el: New file. * mdcompact/mdcompact.el: Likewise. * mdcompact/tests/1.md: Likewise. * mdcompact/tests/1.md.out: Likewise. * mdcompact/tests/2.md: Likewise. * mdcompact/tests/2.md.out: Likewise. * mdcompact/tests/3.md: Likewise. * mdcompact/tests/3.md.out: Likewise. * mdcompact/tests/4.md: Likewise. * mdcompact/tests/4.md.out: Likewise. * mdcompact/tests/5.md: Likewise. * mdcompact/tests/5.md.out: Likewise. * mdcompact/tests/6.md: Likewise. * mdcompact/tests/6.md.out: Likewise. * mdcompact/tests/7.md: Likewise. * mdcompact/tests/7.md.out: Likewise. --- contrib/mdcompact/mdcompact-testsuite.el | 56 +++++ contrib/mdcompact/mdcompact.el | 296 +++++++++++++++++++++++ contrib/mdcompact/tests/1.md | 36 +++ contrib/mdcompact/tests/1.md.out | 32 +++ contrib/mdcompact/tests/2.md | 25 ++ contrib/mdcompact/tests/2.md.out | 21 ++ contrib/mdcompact/tests/3.md | 16 ++ contrib/mdcompact/tests/3.md.out | 17 ++ contrib/mdcompact/tests/4.md | 17 ++ contrib/mdcompact/tests/4.md.out | 17 ++ contrib/mdcompact/tests/5.md | 12 + contrib/mdcompact/tests/5.md.out | 11 + contrib/mdcompact/tests/6.md | 11 + contrib/mdcompact/tests/6.md.out | 11 + contrib/mdcompact/tests/7.md | 11 + contrib/mdcompact/tests/7.md.out | 11 + 16 files changed, 600 insertions(+) create mode 100644 contrib/mdcompact/mdcompact-testsuite.el create mode 100644 contrib/mdcompact/mdcompact.el create mode 100644 contrib/mdcompact/tests/1.md create mode 100644 contrib/mdcompact/tests/1.md.out create mode 100644 contrib/mdcompact/tests/2.md create mode 100644 contrib/mdcompact/tests/2.md.out create mode 100644 contrib/mdcompact/tests/3.md create mode 100644 contrib/mdcompact/tests/3.md.out create mode 100644 contrib/mdcompact/tests/4.md create mode 100644 contrib/mdcompact/tests/4.md.out create mode 100644 contrib/mdcompact/tests/5.md create mode 100644 contrib/mdcompact/tests/5.md.out create mode 100644 contrib/mdcompact/tests/6.md create mode 100644 contrib/mdcompact/tests/6.md.out create mode 100644 contrib/mdcompact/tests/7.md create mode 100644 contrib/mdcompact/tests/7.md.out diff --git a/contrib/mdcompact/mdcompact-testsuite.el b/contrib/mdcompact/mdcompact-testsuite.el new file mode 100644 index 00000000000..494c0b5cd68 --- /dev/null +++ b/contrib/mdcompact/mdcompact-testsuite.el @@ -0,0 +1,56 @@ +;;; -*- lexical-binding: t; -*- + +;; This file is part of GCC. + +;; GCC is free software: you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GCC is distributed in the hope that it will be useful, but WITHOUT +;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public +;; License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GCC. If not, see . + +;;; Commentary: + +;;; Usage: +;; $ emacs -batch -l mdcompact.el -l mdcompact-testsuite.el -f ert-run-tests-batch-and-exit + +;;; Code: + +(require 'mdcompact) +(require 'ert) + +(defconst mdcompat-test-directory (concat (file-name-directory + (or load-file-name + buffer-file-name)) + "tests/")) + +(defun mdcompat-test-run (f) + (with-temp-buffer + (insert-file-contents f) + (mdcomp-run-at-point) + (let ((a (buffer-string)) + (b (with-temp-buffer + (insert-file-contents (concat f ".out")) + (buffer-string)))) + (should (string= a b))))) + +(defmacro mdcompat-gen-tests () + `(progn + ,@(cl-loop + for f in (directory-files mdcompat-test-directory t "md$") + collect + `(ert-deftest ,(intern (concat "mdcompat-test-" + (file-name-sans-extension + (file-name-nondirectory f)))) + () + (mdcompat-test-run ,f))))) + +(mdcompat-gen-tests) + +;;; mdcompact-testsuite.el ends here diff --git a/contrib/mdcompact/mdcompact.el b/contrib/mdcompact/mdcompact.el new file mode 100644 index 00000000000..9b639f53188 --- /dev/null +++ b/contrib/mdcompact/mdcompact.el @@ -0,0 +1,296 @@ +;;; -*- lexical-binding: t; -*- + +;; Author: Andrea Corallo +;; Package: mdcompact +;; Keywords: languages, extensions +;; Package-Requires: ((emacs "29")) + +;; This file is part of GCC. + +;; GCC is free software: you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GCC is distributed in the hope that it will be useful, but WITHOUT +;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public +;; License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GCC. If not, see . + +;;; Commentary: + +;; Convert multi choice GCC machine description patterns to compact +;; syntax. + +;;; Usage: + +;; With the point on a pattern run 'M-x mdcomp-run-at-point' to +;; convert that pattern. + +;; Run 'M-x mdcomp-run-buffer' to convert all convertible patterns in +;; the current buffer. + +;; Run 'M-x mdcomp-run-directory' to convert all convertible patterns +;; in a directory. + +;; One can invoke the tool from shell as well, ex for running it on +;; the arm backend from the GCC checkout directory: +;; emacs -batch -l ./contrib/mdcompact/mdcompact.el -f mdcomp-run-directory ./gcc/config/arm/ + +;;; Code: + +(require 'cl-lib) +(require 'rx) + +(defconst + mdcomp-constr-rx + (rx "(match_operand" (? ":" (1+ (or punct alnum))) + (1+ space) (group-n 1 num) (1+ space) "\"" + (1+ (or alnum "_" "<" ">")) "\"" + (group-n 2 (1+ space) "\"" (group-n 3 (0+ (not "\""))) "\"") + ")")) + +(cl-defstruct mdcomp-operand + num + cstr) + +(cl-defstruct mdcomp-attr + name + vals) + +;; A reasonable name +(rx-define mdcomp-name (1+ (or alnum "_"))) + +(defconst mdcomp-attr-rx + (rx "(set_attr" (1+ space) "\"" + (group-n 1 mdcomp-name) + "\"" (1+ space) "\"" + (group-n 2 (1+ (not ")"))) + "\"" (0+ space) ")")) + +(defun mdcomp-parse-delete-attr () + (save-match-data + (when (re-search-forward mdcomp-attr-rx nil t) + (let ((res (save-match-data + (make-mdcomp-attr + :name (match-string-no-properties 1) + :vals (cl-delete-if #'string-empty-p + (split-string + (replace-regexp-in-string + (rx "\\") "" + (match-string-no-properties 2)) + (rx (1+ (or space ","))))))))) + (if (length= (mdcomp-attr-vals res) 1) + 'short + (delete-region (match-beginning 0) (match-end 0)) + res))))) + +(defun mdcomp-parse-attrs () + (save-excursion + (let* ((res (cl-loop for x = (mdcomp-parse-delete-attr) + while x + collect x)) + (beg (re-search-backward (rx bol (1+ space) "[")))) + (unless (memq 'short res) + (when res + (delete-region beg (re-search-forward (rx "]"))))) + (cl-delete 'short res)))) + +(defun mdcomp-remove-quoting (beg) + (save-excursion + (save-match-data + (replace-regexp-in-region (regexp-quote "\\\\") "\\\\" beg (point-max)) + (replace-regexp-in-region (regexp-quote "\\\"") "\"" beg (point-max))))) + +(defun mdcomp-remove-escaped-newlines (beg) + (save-excursion + (save-match-data + (replace-regexp-in-region (rx "\\" eol (0+ space)) " " beg (point-max))))) + +(defun mdcomp-parse-delete-cstr () + (cl-loop while (re-search-forward mdcomp-constr-rx nil t) + unless (string= "" (match-string-no-properties 3)) + collect (save-match-data + (make-mdcomp-operand + :num (string-to-number (match-string-no-properties 1)) + :cstr (cl-delete-if #'string-empty-p + (split-string + (replace-regexp-in-string " " "" + (match-string-no-properties 3)) + (rx (1+ ",")))))) + do (delete-region (match-beginning 2) (match-end 2)))) + +(defun mdcomp-run* () + (let* ((ops (mdcomp-parse-delete-cstr)) + (attrs (mdcomp-parse-attrs)) + (beg (re-search-forward "\"@"))) + (cl-sort ops (lambda (x y) + (< (mdcomp-operand-num x) (mdcomp-operand-num y)))) + (mdcomp-remove-escaped-newlines beg) + (save-match-data + (save-excursion + (left-char 2) + (forward-sexp) + (left-char 1) + (delete-char 1) + (insert "\n }"))) + (mdcomp-remove-quoting beg) + (replace-match "{@") + (re-search-forward (rx (or "\"" ")"))) + (re-search-backward "@") + (right-char 1) + (insert "[ cons: ") + (cl-loop + for op in ops + when (string-match "=" (cl-first (mdcomp-operand-cstr op))) + do (insert "=") + do (insert (number-to-string (mdcomp-operand-num op)) ", ") + finally + (progn + ;; In case add attributes names + (when attrs + (delete-char -2) + (insert "; attrs: ") + (cl-loop for attr in attrs + do (insert (mdcomp-attr-name attr) ", "))) + (delete-char -2) + (insert "]"))) + (cl-loop + while (re-search-forward (rx bol (0+ space) (or (group-n 1 "* return") + (group-n 2 "}") + "#" alpha "<")) + nil t) + for i from 0 + when (match-string 2) + do (cl-return) + when (match-string 1) + do (progn + (delete-region (match-beginning 1) (+ (match-beginning 1) (length "* return"))) + (insert "<<") + (left-char 1)) + do + (progn + (left-char 1) + (cl-loop + initially (insert " [ ") + for op in ops + for c = (nth i (mdcomp-operand-cstr op)) + unless c + do (cl-return) + do (insert (if (string-match "=" c) + (substring c 1 nil) + c) + ", ") + finally (progn + (when attrs + (delete-char -2) + (insert "; ") + (cl-loop for attr in attrs + for str = (nth i (mdcomp-attr-vals attr)) + when str + do (insert str) + do (insert ", "))) + (delete-char -2) + (insert " ] ") + (move-end-of-line 1))))) + ;; remove everything after ] align what needs to be aligned + ;; and re-add the asm template + (re-search-backward (regexp-quote "@[ cons:")) + (let* ((n (length (mdcomp-operand-cstr (car ops)))) + (asms (cl-loop + initially (re-search-forward "]") + repeat n + collect (let* ((beg (re-search-forward "]")) + (end (re-search-forward (rx eol))) + (str (buffer-substring-no-properties beg end))) + (delete-region beg end) + str))) + (beg (re-search-backward (regexp-quote "@[ cons:"))) + (indent-tabs-mode nil)) + (re-search-forward "}") + (align-regexp beg (point) (rx (group-n 1 "") "[")) + (align-regexp beg (point) (rx (group-n 1 "") (or "," ";")) nil nil t) + (align-regexp beg (point) (rx (group-n 1 "") "]")) + (goto-char beg) + (cl-loop + initially (re-search-forward "]") + for i below n + do (progn + (re-search-forward "]") + (insert (nth i asms)))) + (when (re-search-forward (rx (1+ (or space eol)) ")") nil t) + (replace-match "\n)" nil t))))) + +(defun mdcomp-narrow-to-md-pattern () + (condition-case nil + (let ((beg (re-search-forward "\n(")) + (end (re-search-forward (rx bol (1+ ")"))))) + (narrow-to-region beg end)) + (error + (narrow-to-defun)))) + +(defun mdcomp-run-at-point () + "Convert the multi choice top-level form around point to compact syntax." + (interactive) + (save-restriction + (save-mark-and-excursion + (mdcomp-narrow-to-md-pattern) + (goto-char (point-min)) + (let ((pattern-name (save-excursion + (re-search-forward (rx "\"" (group-n 1 (1+ (not "\""))) "\"")) + (match-string-no-properties 1))) + (orig-text (buffer-substring-no-properties (point-min) (point-max)))) + (condition-case nil + (progn + (mdcomp-run*) + (message "Converted: %s" pattern-name)) + (error + (message "Skipping convertion for: %s" pattern-name) + (delete-region (point-min) (point-max)) + (insert orig-text) + 'fail)))))) + +(defun mdcomp-run-buffer () + "Convert the multi choice top-level forms in the buffer to compact syntax." + (interactive) + (save-excursion + (message "Conversion for buffer %s started" (buffer-file-name)) + (goto-char (point-min)) + (while (re-search-forward + (rx "match_operand" (1+ any) letter (0+ space) "," (0+ space) letter) nil t) + (when (eq (mdcomp-run-at-point) 'fail) + (condition-case nil + (forward-sexp) + (error + ;; If forward-sexp fails falls back. + (re-search-forward (rx ")" eol eol)))))) + (message "Conversion done"))) + +(defconst mdcomp-file-rx (rx bol alpha (0+ not-newline) ".md" eol)) + +(defun mdcomp-run-directory (folder &optional recursive) + "Run el mdcompact on a FOLDER possibly in a RECURSIVE fashion." + (interactive "D") + (let ((before-save-hook nil) + (init-time (current-time))) + (mapc (lambda (f) + (with-temp-file f + (message "Working on %s" f) + (insert-file-contents f) + (mdcomp-run-buffer) + (message "Done with %s" f))) + (if recursive + (directory-files-recursively folder mdcomp-file-rx) + (directory-files folder t mdcomp-file-rx))) + (message "Converted in %f sec" (float-time (time-since init-time))))) + +(defun mdcomp-batch-run-directory () + "Same as `mdcomp-run-directory' but use cmd line args." + (mdcomp-run-directory (nth 0 argv) (nth 1 argv))) + +(provide 'mdcompact) + +;;; mdcompact.el ends here diff --git a/contrib/mdcompact/tests/1.md b/contrib/mdcompact/tests/1.md new file mode 100644 index 00000000000..8f57ab487a5 --- /dev/null +++ b/contrib/mdcompact/tests/1.md @@ -0,0 +1,36 @@ +(define_insn_and_split "*movsi_aarch64" + [(set (match_operand:SI 0 "nonimmediate_operand" "=r,k,r,r,r,r, r,w, m, m, r, r, r, w,r,w, w") + (match_operand:SI 1 "aarch64_mov_operand" " r,r,k,M,n,Usv,m,m,rZ,w,Usw,Usa,Ush,rZ,w,w,Ds"))] + "(register_operand (operands[0], SImode) + || aarch64_reg_or_zero (operands[1], SImode))" + "@ + mov\\t%w0, %w1 + mov\\t%w0, %w1 + mov\\t%w0, %w1 + mov\\t%w0, %1 + # + * return aarch64_output_sve_cnt_immediate (\"cnt\", \"%x0\", operands[1]); + ldr\\t%w0, %1 + ldr\\t%s0, %1 + str\\t%w1, %0 + str\\t%s1, %0 + adrp\\t%x0, %A1\;ldr\\t%w0, [%x0, %L1] + adr\\t%x0, %c1 + adrp\\t%x0, %A1 + fmov\\t%s0, %w1 + fmov\\t%w0, %s1 + fmov\\t%s0, %s1 + * return aarch64_output_scalar_simd_mov_immediate (operands[1], SImode);" + "CONST_INT_P (operands[1]) && !aarch64_move_imm (INTVAL (operands[1]), SImode) + && REG_P (operands[0]) && GP_REGNUM_P (REGNO (operands[0]))" + [(const_int 0)] + "{ + aarch64_expand_mov_immediate (operands[0], operands[1]); + DONE; + }" + [(set_attr "type" "mov_reg,mov_reg,mov_reg,mov_imm,mov_imm,mov_imm,load_4, + load_4,store_4,store_4,load_4,adr,adr,f_mcr,f_mrc,fmov,neon_move") + (set_attr "arch" "*,*,*,*,*,sve,*,fp,*,fp,*,*,*,fp,fp,fp,simd") + (set_attr "length" "4,4,4,4,*, 4,4, 4,4, 4,8,4,4, 4, 4, 4, 4") +] +) diff --git a/contrib/mdcompact/tests/1.md.out b/contrib/mdcompact/tests/1.md.out new file mode 100644 index 00000000000..24f280dd29e --- /dev/null +++ b/contrib/mdcompact/tests/1.md.out @@ -0,0 +1,32 @@ +(define_insn_and_split "*movsi_aarch64" + [(set (match_operand:SI 0 "nonimmediate_operand") + (match_operand:SI 1 "aarch64_mov_operand"))] + "(register_operand (operands[0], SImode) + || aarch64_reg_or_zero (operands[1], SImode))" + {@ [ cons: =0 , 1 ; attrs: type , arch , length ] + [ r , r ; mov_reg , * , 4 ] mov\t%w0, %w1 + [ k , r ; mov_reg , * , 4 ] mov\t%w0, %w1 + [ r , k ; mov_reg , * , 4 ] mov\t%w0, %w1 + [ r , M ; mov_imm , * , 4 ] mov\t%w0, %1 + [ r , n ; mov_imm , * , * ] # + [ r , Usv ; mov_imm , sve , 4 ] << aarch64_output_sve_cnt_immediate ("cnt", "%x0", operands[1]); + [ r , m ; load_4 , * , 4 ] ldr\t%w0, %1 + [ w , m ; load_4 , fp , 4 ] ldr\t%s0, %1 + [ m , rZ ; store_4 , * , 4 ] str\t%w1, %0 + [ m , w ; store_4 , fp , 4 ] str\t%s1, %0 + [ r , Usw ; load_4 , * , 8 ] adrp\t%x0, %A1\;ldr\t%w0, [%x0, %L1] + [ r , Usa ; adr , * , 4 ] adr\t%x0, %c1 + [ r , Ush ; adr , * , 4 ] adrp\t%x0, %A1 + [ w , rZ ; f_mcr , fp , 4 ] fmov\t%s0, %w1 + [ r , w ; f_mrc , fp , 4 ] fmov\t%w0, %s1 + [ w , w ; fmov , fp , 4 ] fmov\t%s0, %s1 + [ w , Ds ; neon_move , simd , 4 ] << aarch64_output_scalar_simd_mov_immediate (operands[1], SImode); + } + "CONST_INT_P (operands[1]) && !aarch64_move_imm (INTVAL (operands[1]), SImode) + && REG_P (operands[0]) && GP_REGNUM_P (REGNO (operands[0]))" + [(const_int 0)] + "{ + aarch64_expand_mov_immediate (operands[0], operands[1]); + DONE; + }" +) diff --git a/contrib/mdcompact/tests/2.md b/contrib/mdcompact/tests/2.md new file mode 100644 index 00000000000..61fba28af95 --- /dev/null +++ b/contrib/mdcompact/tests/2.md @@ -0,0 +1,25 @@ +(define_insn "*movti_aarch64" + [(set (match_operand:TI 0 + "nonimmediate_operand" "= r,w,w,w, r,w,r,m,m,w,m") + (match_operand:TI 1 + "aarch64_movti_operand" " rUti,Z,Z,r, w,w,m,r,Z,m,w"))] + "(register_operand (operands[0], TImode) + || aarch64_reg_or_zero (operands[1], TImode))" + "@ + # + movi\\t%0.2d, #0 + fmov\t%d0, xzr + # + # + mov\\t%0.16b, %1.16b + ldp\\t%0, %H0, %1 + stp\\t%1, %H1, %0 + stp\\txzr, xzr, %0 + ldr\\t%q0, %1 + str\\t%q1, %0" + [(set_attr "type" "multiple,neon_move,f_mcr,f_mcr,f_mrc,neon_logic_q, \ + load_16,store_16,store_16,\ + load_16,store_16") + (set_attr "length" "8,4,4,8,8,4,4,4,4,4,4") + (set_attr "arch" "*,simd,*,*,*,simd,*,*,*,fp,fp")] +) diff --git a/contrib/mdcompact/tests/2.md.out b/contrib/mdcompact/tests/2.md.out new file mode 100644 index 00000000000..b3d5402df78 --- /dev/null +++ b/contrib/mdcompact/tests/2.md.out @@ -0,0 +1,21 @@ +(define_insn "*movti_aarch64" + [(set (match_operand:TI 0 + "nonimmediate_operand") + (match_operand:TI 1 + "aarch64_movti_operand"))] + "(register_operand (operands[0], TImode) + || aarch64_reg_or_zero (operands[1], TImode))" + {@ [ cons: =0 , 1 ; attrs: type , length , arch ] + [ r , rUti ; multiple , 8 , * ] # + [ w , Z ; neon_move , 4 , simd ] movi\t%0.2d, #0 + [ w , Z ; f_mcr , 4 , * ] fmov\t%d0, xzr + [ w , r ; f_mcr , 8 , * ] # + [ r , w ; f_mrc , 8 , * ] # + [ w , w ; neon_logic_q , 4 , simd ] mov\t%0.16b, %1.16b + [ r , m ; load_16 , 4 , * ] ldp\t%0, %H0, %1 + [ m , r ; store_16 , 4 , * ] stp\t%1, %H1, %0 + [ m , Z ; store_16 , 4 , * ] stp\txzr, xzr, %0 + [ w , m ; load_16 , 4 , fp ] ldr\t%q0, %1 + [ m , w ; store_16 , 4 , fp ] str\t%q1, %0 + } +) diff --git a/contrib/mdcompact/tests/3.md b/contrib/mdcompact/tests/3.md new file mode 100644 index 00000000000..79f3a1a88f8 --- /dev/null +++ b/contrib/mdcompact/tests/3.md @@ -0,0 +1,16 @@ +(define_insn "*add3_compareV_cconly_imm" + [(set (reg:CC_V CC_REGNUM) + (compare:CC_V + (plus: + (sign_extend: (match_operand:GPI 0 "register_operand" "r,r")) + (match_operand: 1 "const_scalar_int_operand" "")) + (sign_extend: + (plus:GPI + (match_dup 0) + (match_operand:GPI 2 "aarch64_plus_immediate" "I,J")))))] + "INTVAL (operands[1]) == INTVAL (operands[2])" + "@ + cmn\\t%0, %1 + cmp\\t%0, #%n1" + [(set_attr "type" "alus_imm")] +) diff --git a/contrib/mdcompact/tests/3.md.out b/contrib/mdcompact/tests/3.md.out new file mode 100644 index 00000000000..1ea25ee44f0 --- /dev/null +++ b/contrib/mdcompact/tests/3.md.out @@ -0,0 +1,17 @@ +(define_insn "*add3_compareV_cconly_imm" + [(set (reg:CC_V CC_REGNUM) + (compare:CC_V + (plus: + (sign_extend: (match_operand:GPI 0 "register_operand")) + (match_operand: 1 "const_scalar_int_operand")) + (sign_extend: + (plus:GPI + (match_dup 0) + (match_operand:GPI 2 "aarch64_plus_immediate")))))] + "INTVAL (operands[1]) == INTVAL (operands[2])" + {@ [ cons: 0 , 2 ] + [ r , I ] cmn\t%0, %1 + [ r , J ] cmp\t%0, #%n1 + } + [(set_attr "type" "alus_imm")] +) diff --git a/contrib/mdcompact/tests/4.md b/contrib/mdcompact/tests/4.md new file mode 100644 index 00000000000..360f63b42e1 --- /dev/null +++ b/contrib/mdcompact/tests/4.md @@ -0,0 +1,17 @@ +(define_insn "*sibcall_insn" + [(call (mem:DI (match_operand:DI 0 "aarch64_call_insn_operand" "Ucs, Usf")) + (match_operand 1 "")) + (unspec:DI [(match_operand:DI 2 "const_int_operand")] UNSPEC_CALLEE_ABI) + (return)] + "SIBLING_CALL_P (insn)" + { + if (which_alternative == 0) + { + output_asm_insn ("br\\t%0", operands); + return aarch64_sls_barrier (aarch64_harden_sls_retbr_p ()); + } + return "b\\t%c0"; + } + [(set_attr "type" "branch, branch") + (set_attr "sls_length" "retbr,none")] +) \ No newline at end of file diff --git a/contrib/mdcompact/tests/4.md.out b/contrib/mdcompact/tests/4.md.out new file mode 100644 index 00000000000..360f63b42e1 --- /dev/null +++ b/contrib/mdcompact/tests/4.md.out @@ -0,0 +1,17 @@ +(define_insn "*sibcall_insn" + [(call (mem:DI (match_operand:DI 0 "aarch64_call_insn_operand" "Ucs, Usf")) + (match_operand 1 "")) + (unspec:DI [(match_operand:DI 2 "const_int_operand")] UNSPEC_CALLEE_ABI) + (return)] + "SIBLING_CALL_P (insn)" + { + if (which_alternative == 0) + { + output_asm_insn ("br\\t%0", operands); + return aarch64_sls_barrier (aarch64_harden_sls_retbr_p ()); + } + return "b\\t%c0"; + } + [(set_attr "type" "branch, branch") + (set_attr "sls_length" "retbr,none")] +) \ No newline at end of file diff --git a/contrib/mdcompact/tests/5.md b/contrib/mdcompact/tests/5.md new file mode 100644 index 00000000000..100dffbc8b1 --- /dev/null +++ b/contrib/mdcompact/tests/5.md @@ -0,0 +1,12 @@ +(define_insn "3" + [(set (match_operand:GPI 0 "register_operand" "=r,rk,w") + (LOGICAL:GPI (match_operand:GPI 1 "register_operand" "%r,r,w") + (match_operand:GPI 2 "aarch64_logical_operand" "r,,w")))] + "" + "@ + \\t%0, %1, %2 + \\t%0, %1, %2 + \\t%0., %1., %2." + [(set_attr "type" "logic_reg,logic_imm,neon_logic") + (set_attr "arch" "*,*,simd")] +) diff --git a/contrib/mdcompact/tests/5.md.out b/contrib/mdcompact/tests/5.md.out new file mode 100644 index 00000000000..ed460ee1530 --- /dev/null +++ b/contrib/mdcompact/tests/5.md.out @@ -0,0 +1,11 @@ +(define_insn "3" + [(set (match_operand:GPI 0 "register_operand") + (LOGICAL:GPI (match_operand:GPI 1 "register_operand") + (match_operand:GPI 2 "aarch64_logical_operand")))] + "" + {@ [ cons: =0 , 1 , 2 ; attrs: type , arch ] + [ r , %r , r ; logic_reg , * ] \t%0, %1, %2 + [ rk , r , ; logic_imm , * ] \t%0, %1, %2 + [ w , w , w ; neon_logic , simd ] \t%0., %1., %2. + } +) diff --git a/contrib/mdcompact/tests/6.md b/contrib/mdcompact/tests/6.md new file mode 100644 index 00000000000..a9f609503e2 --- /dev/null +++ b/contrib/mdcompact/tests/6.md @@ -0,0 +1,11 @@ +(define_insn "aarch64_wrffr" + [(set (reg:VNx16BI FFR_REGNUM) + (match_operand:VNx16BI 0 "aarch64_simd_reg_or_minus_one")) + (set (reg:VNx16BI FFRT_REGNUM) + (unspec:VNx16BI [(match_dup 0)] UNSPEC_WRFFR))] + "TARGET_SVE" + {@ [ cons: 0 ] + [ Dm ] setffr + [ Upa ] wrffr\t%0.b + } +) diff --git a/contrib/mdcompact/tests/6.md.out b/contrib/mdcompact/tests/6.md.out new file mode 100644 index 00000000000..a9f609503e2 --- /dev/null +++ b/contrib/mdcompact/tests/6.md.out @@ -0,0 +1,11 @@ +(define_insn "aarch64_wrffr" + [(set (reg:VNx16BI FFR_REGNUM) + (match_operand:VNx16BI 0 "aarch64_simd_reg_or_minus_one")) + (set (reg:VNx16BI FFRT_REGNUM) + (unspec:VNx16BI [(match_dup 0)] UNSPEC_WRFFR))] + "TARGET_SVE" + {@ [ cons: 0 ] + [ Dm ] setffr + [ Upa ] wrffr\t%0.b + } +) diff --git a/contrib/mdcompact/tests/7.md b/contrib/mdcompact/tests/7.md new file mode 100644 index 00000000000..6616deaa8db --- /dev/null +++ b/contrib/mdcompact/tests/7.md @@ -0,0 +1,11 @@ +(define_insn "and3" + [(set (match_operand:VDQ_I 0 "register_operand" "=w,w") + (and:VDQ_I (match_operand:VDQ_I 1 "register_operand" "w,0") + (match_operand:VDQ_I 2 "aarch64_reg_or_bic_imm" "w,Db")))] + "TARGET_SIMD" + "@ + and\t%0., %1., %2. + * return aarch64_output_simd_mov_immediate (operands[2], ,\ + AARCH64_CHECK_BIC);" + [(set_attr "type" "neon_logic")] +) diff --git a/contrib/mdcompact/tests/7.md.out b/contrib/mdcompact/tests/7.md.out new file mode 100644 index 00000000000..199b37a810f --- /dev/null +++ b/contrib/mdcompact/tests/7.md.out @@ -0,0 +1,11 @@ +(define_insn "and3" + [(set (match_operand:VDQ_I 0 "register_operand") + (and:VDQ_I (match_operand:VDQ_I 1 "register_operand") + (match_operand:VDQ_I 2 "aarch64_reg_or_bic_imm")))] + "TARGET_SIMD" + {@ [ cons: =0 , 1 , 2 ] + [ w , w , w ] and\t%0., %1., %2. + [ w , 0 , Db ] << aarch64_output_simd_mov_immediate (operands[2], , AARCH64_CHECK_BIC); + } + [(set_attr "type" "neon_logic")] +)