From patchwork Fri Mar 3 13:06:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 63908 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp398900wrd; Fri, 3 Mar 2023 05:10:08 -0800 (PST) X-Google-Smtp-Source: AK7set9eq00iKX/D3rCMxtdFSqHsHQcjAj8hqMf135JThCHK1+HnZQ6N6yd3FjVXHeHCQETQo3mr X-Received: by 2002:a17:906:1e97:b0:8af:2fa1:619e with SMTP id e23-20020a1709061e9700b008af2fa1619emr5758031ejj.18.1677849008347; Fri, 03 Mar 2023 05:10:08 -0800 (PST) Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id p14-20020a1709065dce00b008b270fe3363si380285ejv.679.2023.03.03.05.10.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Mar 2023 05:10:08 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=etDFIyR2; arc=fail (signature failed); spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 494123847816 for ; Fri, 3 Mar 2023 13:07:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 494123847816 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1677848829; bh=bDl2w03uFF139AwML/kJefoWMhrdn+BHMDWCkhmdKOw=; h=Date:Subject:To:Cc:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=etDFIyR2B7blD4sLgNhk7QFYeQmBPA626yeLIq1ke6GqSLPU45BJz89CLT4j951rD tUO/qAPr7OoeEjb6agv1tHOngIvbMMXIGD3qy7wZIy1u5at3hqqKRT28k1O4pUYIpT q0GFbFisS/CGHLPhMFEZHtSHMXXwQm5Y1P5mBDH4= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2055.outbound.protection.outlook.com [40.107.7.55]) by sourceware.org (Postfix) with ESMTPS id 4F26F3857C71 for ; Fri, 3 Mar 2023 13:07:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4F26F3857C71 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aURtDqfFRkVoMh1pSozboR+cRIeASU/dQ9vziP7UKEwS+whelwYmYWmRiY4ty8nQKBqylY7vx4pxti+dGgKV8ihEUbdm7Tl0RkF0ELkcT7tC+VHRBc3vZk227HRIpdUygAv3qKYgiVdQAJk5K1GsaL9wzeNjBxeTlzXrTktizulhCfA8bGPDEbkMk2fl5qonoRcwMdWMzIzee7oGuBLKPdFmt2WZDCVT59tcOKSWMFQ7g3av/VtLzJP1ADFG5ux0ttrLO2AYChdttrPpvUIC/6BFvzQFWcNkWitBunBToi0WSY4s3Y2LUgxL9mXzEWQFEM3tU8K0nQ9QAlBA1acv0Q== 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=bDl2w03uFF139AwML/kJefoWMhrdn+BHMDWCkhmdKOw=; b=O2xVs2ap3f9i1bjRETgk590gVpzwR1wu8AmPICNn0Fk582kgKIKtOZxEwWI5wK43hw4Kf6eI46RCqlxpfhQpVjJCCf7oAJlx+NukCp9MdjEPveK2sx3RwzcTSOcFL7xQdSNtEEIP8eFLfQV1ZdPlzxO03Z+4y9CEL390NzEF4P0W989SMvPi6rdxfqpoBwOhSHrZDZjoachzyCS3cVo16uscoPy2y/kSF7YqQoha4nl+o960qjHOHv/cR2/K53ZKCDe+5GGQ0yGTv04EWZ/hWqgsjMJtkv9oNGkfWvPnLV73UgWYmDAtBjE0aAOQ2YKMclhHT6doQaj4hiMym1GLbg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none Received: from VE1PR04MB6560.eurprd04.prod.outlook.com (2603:10a6:803:122::25) by PAXPR04MB9156.eurprd04.prod.outlook.com (2603:10a6:102:22f::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.20; Fri, 3 Mar 2023 13:06:58 +0000 Received: from VE1PR04MB6560.eurprd04.prod.outlook.com ([fe80::154e:166d:ec25:531b]) by VE1PR04MB6560.eurprd04.prod.outlook.com ([fe80::154e:166d:ec25:531b%7]) with mapi id 15.20.6156.019; Fri, 3 Mar 2023 13:06:58 +0000 Message-ID: <390b97ee-c38a-4239-01a4-32d17ecdf44c@suse.com> Date: Fri, 3 Mar 2023 14:06:56 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: [PATCH RFC 18/18] x86: .insn example - VEX-encoded instructions of original Xeon Phi Content-Language: en-US To: Binutils Cc: "H.J. Lu" , "Jiang, Haochen" References: <764b9e03-18bd-6945-692f-a250522196ca@suse.com> In-Reply-To: <764b9e03-18bd-6945-692f-a250522196ca@suse.com> X-ClientProxiedBy: FR2P281CA0047.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:92::14) To VE1PR04MB6560.eurprd04.prod.outlook.com (2603:10a6:803:122::25) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1PR04MB6560:EE_|PAXPR04MB9156:EE_ X-MS-Office365-Filtering-Correlation-Id: 9607bb96-0569-4628-7353-08db1be82b9a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JoVB+PhnyAI+Y3g2vaMdsjdPgxp1ryBu3JhrxUG5ninkK9PkBi6o8uD/0ehHXtqek/yr8rMkO3S+aBtdnme/1s9vycGJLgnRm9EmEnm6dYyXeRtrq/A7JUYUXvc8auXR1qZEtrGVoIjbP9E6FGgG43RtKFszwVNYifkwpfZkVRQLGzysmzAF89J3tpWmGu3QJC57TtbnY/URz34hK3Oo7nfJz7nDEnw8aHJra4zUECPLfD+y3AAWDLb1J8uZJ1q7Yd1ibAwL0LT6H78OfDBa5H8Un0nsy+a7n/EL/YaJRft1vbILEfjNx7FQq1wqUR7Bf8Y14cgdv4IptItcD7B3kSa7C3yV+2D6hidLhIplTlOf947JKxR8NIpajjCpmsOCBPCMcD2iRduNBQu7BV+8jCxti7gOs0D5hxJMoPtWomY0u2Cqc0OTvuDKLjSg0zWpSwE8VfqwmpbF6lCQAdqf1ZxPGLGbTyLNsMS6AISg2GSVy90/hE5iXrW0Jgh18LRHwlYOjpLvmyazS5q5U79YZKcTZPZhZ6yhBaEzVlctdZvqVgqZOjBJNqUmyy98ZMZyKpK2UwK31Icffl+Gk/kejO8Yxz8TjktcCEZzKv9C88bxK3NozolCak+pWW92YTtfg0gnaECXICXZoFg2PYfz/o0ZqInC5bHsDwdhym2NbD5ji1clVTaF9trPuh6/05hmby6JV0vOr8LfQ9QgrOGzTEaaiKs1GwJog0EdxXDRs6M= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VE1PR04MB6560.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(136003)(366004)(376002)(396003)(39860400002)(346002)(451199018)(66476007)(31696002)(66946007)(66556008)(8676002)(6916009)(83380400001)(4326008)(86362001)(2616005)(38100700002)(36756003)(26005)(6512007)(316002)(186003)(6506007)(478600001)(54906003)(6486002)(5660300002)(8936002)(31686004)(2906002)(41300700001)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?Xk24xcz3L56s6BoM6JP2UUGWQcOi?= =?utf-8?q?LhwVNdpWMXMudonzA13f9BLnN1W1jyUgW5DNC5vymUwqWa+IqI/SbBXAdgXBkdZmS?= =?utf-8?q?+il6KM+x5bBcarK+cpDUzXclAQTxRh+x5bo90A0UKL/VaGuUgszLw3L1ZUC7acPiQ?= =?utf-8?q?DpMYnnFyF1ol25bFi/gMI1v41jQGzBRz9D1JzbKy/9WKwbhkuimzFxFfDl7i4IWVj?= =?utf-8?q?dNmwC1VzT6vUIa+GIHm/MB2A+zDySOS1P9iifq1i2kRyn5ghXu9o9xmF/qtwW46Sj?= =?utf-8?q?+jSGx+h2yIUbnpOw47ZvQF5mh9o2MRkLScguVFo8X9GVhw2bV4RlQBrqvV0J5xDxF?= =?utf-8?q?bnLBwBrZojK2NXnWo0677jqiu/v/D7FOoH7Wg5OXgwDgFQaVtLcx0OULzwmaKuM7b?= =?utf-8?q?/+fjVqy9u43MkxxUlogTVQO3OVWkSpLGVpRlpzs6d8V79PwPrKS8u1Um5oY7QH9Ln?= =?utf-8?q?PMj+zIeXeCYri/FXc32Rtix4uSnb6PhBMRpSDBs0+OM7LPJW5TbPvtbsU36RJYmGW?= =?utf-8?q?ve5myHgmjKYlDMmbU5g/HUG7jh0AD+iZS2ZDUQXoI7cBGLY3yZG6gXNPrZeftyvpJ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f-8?q?hrqVIbf5lZry1UH6dsBaiMoLea1HzZ0VTn175AII/fwUAFJ7tSRCG/haeTwzTffsR?= =?utf-8?q?bv5jAKJogkPo?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9607bb96-0569-4628-7353-08db1be82b9a X-MS-Exchange-CrossTenant-AuthSource: VE1PR04MB6560.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2023 13:06:58.2837 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: nCIhwFPvG/seNzHdEyq6bx+xpwfRfq8zH2jDxc02J/yPuLSzkuqqUOnlX3LDl5R0ZwAHNMe83znKMgFK80mtMw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB9156 X-Spam-Status: No, score=-3028.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jan Beulich via Binutils From: Jan Beulich Reply-To: Jan Beulich Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759352201921160473?= X-GMAIL-MSGID: =?utf-8?q?1759352201921160473?= While obviously the otherwise unknown to gas MVEX encoded insns cannot be expressed (for now gas simply doesn't know to keep clear the bit distinguishing it from EVEX, and of course Phi-specific operand forms also aren't known to it), the VEX ones can be. Since the disassembler produces utter rubbish, have expectations - at least for the time being - in raw hex dump form. (I've verified with my own disassembler that generated code is correct.) --- RFC: Do we want this as a new testcase? --- a/gas/testsuite/gas/i386/i386.exp +++ b/gas/testsuite/gas/i386/i386.exp @@ -875,6 +875,7 @@ if [gas_64_check] then { run_dump_test "x86-64-sysenter-amd" run_list_test "x86-64-sysenter-amd" "-mamd64" run_dump_test "insn-64" + run_dump_test "insn-Phi" run_dump_test "noreg64" run_list_test "noreg64" run_dump_test "noreg64-data16" --- /dev/null +++ b/gas/testsuite/gas/i386/insn-Phi.d @@ -0,0 +1,19 @@ +#objdump: -sj.text +#name: .insn (Xeon Phi) + +.*: +file format .* + +Contents of section .text: + 0000 c5fbae78 40c5faae 7840c4c1 7aaef0c4 .* + 0010 e1faaef1 c4e06074 e7c5d885 e0ffffff .* + 0020 c5f841d1 c5f842d1 c5f843d1 c56895c1 .* + 0030 c5e897f9 c4c3783e d103c5f8 48d1c5f8 .* + 0040 49d1c5f8 90d1c578 93d1c4c1 7892d1c5 .* + 0050 f844d1c5 f845d1c5 f898d1c5 f846d1c5 .* + 0060 f847d1c4 c17abdc8 c461fabd c1c57ab8 .* + 0070 c1c4c1fa b8c8c5fb aef1c4c1 fbaef0c4 .* + 0080 c17abcc8 c461fabc c1c57bbc c1c4c1fb .* + 0090 bcc8c5f8 184f40c4 c1781850 40c4c178 .* + 00a0 185f40c5 f8182d55 ffffffc4 a1781834 .* + 00b0 41c4c178 183c88c5 f81824c5 00000000 .* + 00c0 c5f81840 40.* --- /dev/null +++ b/gas/testsuite/gas/i386/insn-Phi.s @@ -0,0 +1,44 @@ + .text +Phi: + .insn VEX.L0.f2.0f 0xae/7, 0x40(%rax) # clevict0 0x40(%rax) + .insn VEX.L0.f3.0f 0xae/7, 0x40(%rax) # clevict1 0x40(%rax) + .insn VEX.L0.f3.0f 0xae/6, %r8d # delay %r8d + .insn VEX.L0.f3.0f 0xae/6, %rcx # delay %rcx + .insn VEX.L0.W0 0x74, $Phi-1f{:s8}, %k3 # jkzd Phi, %k3 +1: + .insn VEX.L0.0f.W0 0x85, $Phi-2f{:s32}, %k4 # jknzd Phi, %k4 +2: + .insn VEX.L0.0f.W0 0x41, %k1, %k2 # kand %k1, %k2 + .insn VEX.L0.0f.W0 0x42, %k1, %k2 # kandn %k1, %k2 + .insn VEX.L0.0f.W0 0x43, %k1, %k2 # kandnr %k1, %k2 + .insn VEX.L0.0f.W0 0x95, %k1, %k2, %r8 # kconcath %k1, %k2, %r8 + .insn VEX.L0.0f.W0 0x97, %k1, %k2, %rdi # kconcatl %k1, %k2, %rdi + .insn VEX.L0.0f3a.W0 0x3e, $3, %r9, %k2 # kextract $3, %r9, %k2 + .insn VEX.L0.0f.W0 0x48, %k1, %k2 # kmergel1h %k1, %k2 + .insn VEX.L0.0f.W0 0x49, %k1, %k2 # kmergel1l %k1, %k2 + .insn VEX.L0.0f.W0 0x90, %k1, %k2 # kmov %k1, %k2 + .insn VEX.L0.0f.W0 0x93, %k1, %r10d # kmov %k1, %r10d + .insn VEX.L0.0f.W0 0x92, %r9d, %k2 # kmov %r9d, %k2 + .insn VEX.L0.0f.W0 0x44, %k1, %k2 # knot %k1, %k2 + .insn VEX.L0.0f.W0 0x45, %k1, %k2 # kor %k1, %k2 + .insn VEX.L0.0f.W0 0x98, %k1, %k2 # kortest %k1, %k2 + .insn VEX.L0.0f.W0 0x46, %k1, %k2 # kxnor %k1, %k2 + .insn VEX.L0.0f.W0 0x47, %k1, %k2 # kxor %k1, %k2 + .insn VEX.L0.f3.0f 0xbd, %r8d, %ecx # lzcnt %r8d, %ecx + .insn VEX.L0.f3.0f 0xbd, %rcx, %r8 # lzcnt %rcx, %r8 + .insn VEX.L0.f3.0f 0xb8, %ecx, %r8d # popcnt %ecx, %r8d + .insn VEX.L0.f3.0f 0xb8, %r8, %rcx # popcnt %r8, %rcx + .insn VEX.L0.f2.0f 0xae/6, %ecx # spflt %ecx + .insn VEX.L0.f2.0f 0xae/6, %r8 # spflt %r8 + .insn VEX.L0.f3.0f 0xbc, %r8d, %ecx # tzcnt %r8d, %ecx + .insn VEX.L0.f3.0f 0xbc, %rcx, %r8 # tzcnt %rcx, %r8 + .insn VEX.L0.f2.0f 0xbc, %ecx, %r8d # tzcnti %ecx, %r8d + .insn VEX.L0.f2.0f 0xbc, %r8, %rcx # tzcnti %r8, %rcx + .insn VEX.L0.0f 0x18/1, 0x40(%rdi) # vprefetch0 0x40(%rdi) + .insn VEX.L0.0f 0x18/2, 0x40(%r8) # vprefetch1 0x40(%r8) + .insn VEX.L0.0f 0x18/3, 0x40(%r15) # vprefetch2 0x40(%r15) + .insn VEX.L0.0f 0x18/5, Phi(%rip) # vprefetche0 Phi(%rip) + .insn VEX.L0.0f 0x18/6, (%rcx,%r8,2) # vprefetche1 (%rcx,%r8,2) + .insn VEX.L0.0f 0x18/7, (%r8,%rcx,4) # vprefetche2 (%r8,%rcx,4) + .insn VEX.L0.0f 0x18/4, (,%rax,8) # vprefetchenta (,%rax,8) + .insn VEX.L0.0f 0x18/0, 0x40(%rax) # vprefetchnta 0x40(%rax)