From patchwork Tue Dec 19 12:12:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Cui, Lili" X-Patchwork-Id: 18290 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp1890454dyi; Tue, 19 Dec 2023 04:12:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IF+TwEqDcLRgXmlfFMwM4YTXw+UgHbfMaZ+BM31aEAI7IJhoyXKXk8ZWQ31nBSTWP9pOmJt X-Received: by 2002:ac8:57c3:0:b0:425:4043:8d3c with SMTP id w3-20020ac857c3000000b0042540438d3cmr17120504qta.87.1702987956826; Tue, 19 Dec 2023 04:12:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1702987956; cv=pass; d=google.com; s=arc-20160816; b=VBhSWBoENxIGqQpMz8j8eVqHJJMvld0YB79cUhLHyFeuMMXOlIV7nP6Khp8a0lpbTL /HMfwKgMfHR2nxI7EyUrAI3Ow5CQukPRMGVi08Y1seKwSTbTAUFsliDStcj27pDBVF1D ouNP8Zfx+8u0a70a+JPtftV0Abz6Febw/QK1YzefyBCvAajpUm3jWrWJsZRlPepFhiwu n4OJ7s0YQz6ae16Gov4ntlyUyEjhPBiNIkgFl2KvQ8nXKwCwqitoNsqUdAQoJspAXrxi 1+DMmURW0sondfdOH9Vq+W9oH5PP0wmX8nKO7l3sc7U1C5TyogOnkQ+5hWsfK3mIrwoe TKhA== 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:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=HIyWvZbwtTCjX2vBVQEoiGbTFxwdOjkrCNY9YkP6xHY=; fh=FtUhYuQVHpmgNVnBO8Ns+o7k2Cbhq17uEhR8APdj3nE=; b=An9T4itDxpaDH5aSvsfM/jus5Mgtqe4uqcnky9gP/O5lKRDu27BMB/etXRsrDIPyPB 68rRN6nvvKa58pNoqcA7IyClKj35FpjGj8ckiMcKj0HM3ecuMc9yteoF8Hj4825O3/eP Ey3bD7WpZztD+5XIpHP8OGqAqJjgy+asL5PRPFGu88hXEa1vmr0m1aIiWoncTlso93OO NY1ToO91I04+dpkts7/m2rl3ySZQDaO7hksbRVhsdwH/V8D+qbcPeatQuhbGQtwiBlQN VlEXwLEpka7RTGpMRcvXiLv17NrPTWvezg+V+DR/LCp6LieINmFff4yGTIJGnVaIxDU7 jOVA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=hTptsC+f; arc=pass (i=1); spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id jr9-20020a05622a800900b0042588d183b4si23820326qtb.753.2023.12.19.04.12.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 04:12:36 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.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=@intel.com header.s=Intel header.b=hTptsC+f; arc=pass (i=1); spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 83C3A385DC1A for ; Tue, 19 Dec 2023 12:12:36 +0000 (GMT) X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) by sourceware.org (Postfix) with ESMTPS id BACB73858417 for ; Tue, 19 Dec 2023 12:12:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BACB73858417 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org BACB73858417 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=134.134.136.100 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702987948; cv=none; b=bt7rK5/EnSExRWoat9/Easqi0os1VPX480TUBn1NX+W+F2dy+wnXlBcHgzB6N73Ggf+HMnMcsCfuCkeFt6FNkWbdFTn4wZzw6x4DhNfa1INKqTF6+JrcV9vLzmnym82wht9aGPC3lGFLJ5qMIuQfBnu+T6Z2Un34YXqFyiPufSs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702987948; c=relaxed/simple; bh=zgI5hqWBmHg8oRRibE2bN3CyOO3V9i8vfMQ5dwPpQuQ=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=fw3epHQuphKyqpMjS5rTkjVrzmD10vZ6EYL1yWuiPHIpcIlcCO3+iZzoUVatnso+8wVyF9Aa4mwZ3RP/Cj7raEQO1o8DP4SyKGVD5rZk3H/qPtWdQWYVnyIKkMp1eDnlUXTN0k3akAoFTQVkK+VpRinDM2MM0gJbz8FCOxCCqfo= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702987946; x=1734523946; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=zgI5hqWBmHg8oRRibE2bN3CyOO3V9i8vfMQ5dwPpQuQ=; b=hTptsC+fXIw+1sOn9XXcG20hYC0sGFRlzWbrYvdk1h6SYUKaadM5Dks5 6g8tmleLJFsKAVBIyUyjjmDQkUQp3+Y/z6n4JgnTJhYt3aywZlFMJiIYZ P66JZPht+2VGiEQwWk66BOF1yJRmG8+gKSah9968pn/Ysa29Ghq6Aa5x0 8h1F7BAZDZJaHMX7BDoOVDPZM5FnPRepUBh/rpQ3g4c0i8lBMxorXGglg rjRQ4cyouZMsI7wnD2Lu1VrwYr9sINtOSUsi616Gwn/ipvkZ1JcGbkcRc NZ13/4WX/A3yw8nArlSfZnGJUCeUB4Ablsk90fAuhFdeBKV3o9f+bgPnc Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10928"; a="462100670" X-IronPort-AV: E=Sophos;i="6.04,288,1695711600"; d="scan'208";a="462100670" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Dec 2023 04:12:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10928"; a="846323759" X-IronPort-AV: E=Sophos;i="6.04,288,1695711600"; d="scan'208";a="846323759" Received: from scymds04.sc.intel.com ([10.82.73.238]) by fmsmga004.fm.intel.com with ESMTP; 19 Dec 2023 04:12:20 -0800 Received: from shgcc101.sh.intel.com (shgcc101.sh.intel.com [10.239.85.97]) by scymds04.sc.intel.com (Postfix) with ESMTP id 882982002D88; Tue, 19 Dec 2023 04:12:19 -0800 (PST) From: "Cui, Lili" To: binutils@sourceware.org Cc: hongjiu.lu@intel.com, jbeulich@suse.com Subject: [PATCH v4 0/9] Support Intel APX EGPR Date: Tue, 19 Dec 2023 12:12:09 +0000 Message-Id: <20231219121218.974012-1-lili.cui@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785712299768356074 X-GMAIL-MSGID: 1785712299768356074 *** BLURB HERE *** Future optimizations to be made. 1. The current implementation of vexvvvvv needs to be optimized. 2. The handling of double VEX/EVEX templates in check_register() needs to be optimized. 3. Convert vround* with egpr to VRNDSCALE* instead of reporting an error. 4. Find a suitable variable to replace OperandConstraint=REX2_REQUIRED. Cui, Lili (5): Support APX GPR32 with rex2 prefix Created an empty EVEX_MAP4_ sub-table for EVEX instructions. Support APX GPR32 with extend evex prefix Add tests for APX GPR32 with extend evex prefix Support APX PUSHP/POPP Hu, Lin1 (2): Support APX NDD optimized encoding. Support APX JMPABS for disassembler Mo, Zewei (1): Support APX Push2/Pop2 konglin1 (1): Support APX NDD gas/config/tc-i386.c | 466 +++++++++++- gas/doc/c-i386.texi | 7 +- gas/testsuite/gas/i386/apx-push2pop2-inval.l | 5 + gas/testsuite/gas/i386/apx-push2pop2-inval.s | 9 + gas/testsuite/gas/i386/i386.exp | 1 + .../i386/ilp32/x86-64-opcode-inval-intel.d | 47 +- .../gas/i386/ilp32/x86-64-opcode-inval.d | 47 +- .../gas/i386/x86-64-apx-egpr-inval.l | 202 +++++ .../gas/i386/x86-64-apx-egpr-inval.s | 209 +++++ .../gas/i386/x86-64-apx-egpr-promote-inval.l | 20 + .../gas/i386/x86-64-apx-egpr-promote-inval.s | 29 + gas/testsuite/gas/i386/x86-64-apx-evex-egpr.d | 20 + gas/testsuite/gas/i386/x86-64-apx-evex-egpr.s | 21 + .../gas/i386/x86-64-apx-evex-promoted-bad.d | 41 + .../gas/i386/x86-64-apx-evex-promoted-bad.s | 43 ++ .../gas/i386/x86-64-apx-evex-promoted-intel.d | 318 ++++++++ .../gas/i386/x86-64-apx-evex-promoted.d | 318 ++++++++ .../gas/i386/x86-64-apx-evex-promoted.s | 314 ++++++++ .../gas/i386/x86-64-apx-jmpabs-intel.d | 12 + .../gas/i386/x86-64-apx-jmpabs-inval.d | 40 + .../gas/i386/x86-64-apx-jmpabs-inval.s | 15 + gas/testsuite/gas/i386/x86-64-apx-jmpabs.d | 12 + gas/testsuite/gas/i386/x86-64-apx-jmpabs.s | 5 + .../gas/i386/x86-64-apx-ndd-optimize.d | 132 ++++ .../gas/i386/x86-64-apx-ndd-optimize.s | 125 +++ gas/testsuite/gas/i386/x86-64-apx-ndd.d | 160 ++++ gas/testsuite/gas/i386/x86-64-apx-ndd.s | 155 ++++ .../gas/i386/x86-64-apx-push2pop2-intel.d | 42 + .../gas/i386/x86-64-apx-push2pop2-inval.l | 13 + .../gas/i386/x86-64-apx-push2pop2-inval.s | 17 + gas/testsuite/gas/i386/x86-64-apx-push2pop2.d | 42 + gas/testsuite/gas/i386/x86-64-apx-push2pop2.s | 39 + .../gas/i386/x86-64-apx-pushp-popp-intel.d | 14 + .../gas/i386/x86-64-apx-pushp-popp-inval.l | 5 + .../gas/i386/x86-64-apx-pushp-popp-inval.s | 7 + .../gas/i386/x86-64-apx-pushp-popp.d | 14 + .../gas/i386/x86-64-apx-pushp-popp.s | 8 + gas/testsuite/gas/i386/x86-64-apx-rex2.d | 83 ++ gas/testsuite/gas/i386/x86-64-apx-rex2.s | 86 +++ gas/testsuite/gas/i386/x86-64-evex.d | 2 +- gas/testsuite/gas/i386/x86-64-inval-pseudo.l | 6 + gas/testsuite/gas/i386/x86-64-inval-pseudo.s | 4 + .../gas/i386/x86-64-opcode-inval-intel.d | 26 +- gas/testsuite/gas/i386/x86-64-opcode-inval.d | 26 +- gas/testsuite/gas/i386/x86-64-opcode-inval.s | 4 - gas/testsuite/gas/i386/x86-64-pseudos-bad.l | 75 +- gas/testsuite/gas/i386/x86-64-pseudos-bad.s | 74 ++ gas/testsuite/gas/i386/x86-64-pseudos.d | 63 ++ gas/testsuite/gas/i386/x86-64-pseudos.s | 64 ++ gas/testsuite/gas/i386/x86-64.exp | 20 +- include/opcode/i386.h | 2 + opcodes/i386-dis-evex-len.h | 10 + opcodes/i386-dis-evex-prefix.h | 66 ++ opcodes/i386-dis-evex-reg.h | 70 ++ opcodes/i386-dis-evex-w.h | 10 + opcodes/i386-dis-evex-x86-64.h | 50 ++ opcodes/i386-dis-evex.h | 347 ++++++++- opcodes/i386-dis.c | 715 +++++++++++++----- opcodes/i386-gen.c | 52 +- opcodes/i386-opc.h | 27 +- opcodes/i386-opc.tbl | 223 ++++-- opcodes/i386-reg.tbl | 64 ++ 62 files changed, 4688 insertions(+), 455 deletions(-) create mode 100644 gas/testsuite/gas/i386/apx-push2pop2-inval.l create mode 100644 gas/testsuite/gas/i386/apx-push2pop2-inval.s create mode 100644 gas/testsuite/gas/i386/x86-64-apx-egpr-inval.l create mode 100644 gas/testsuite/gas/i386/x86-64-apx-egpr-inval.s create mode 100644 gas/testsuite/gas/i386/x86-64-apx-egpr-promote-inval.l create mode 100644 gas/testsuite/gas/i386/x86-64-apx-egpr-promote-inval.s create mode 100644 gas/testsuite/gas/i386/x86-64-apx-evex-egpr.d create mode 100644 gas/testsuite/gas/i386/x86-64-apx-evex-egpr.s create mode 100644 gas/testsuite/gas/i386/x86-64-apx-evex-promoted-bad.d create mode 100644 gas/testsuite/gas/i386/x86-64-apx-evex-promoted-bad.s create mode 100644 gas/testsuite/gas/i386/x86-64-apx-evex-promoted-intel.d create mode 100644 gas/testsuite/gas/i386/x86-64-apx-evex-promoted.d create mode 100644 gas/testsuite/gas/i386/x86-64-apx-evex-promoted.s create mode 100644 gas/testsuite/gas/i386/x86-64-apx-jmpabs-intel.d create mode 100644 gas/testsuite/gas/i386/x86-64-apx-jmpabs-inval.d create mode 100644 gas/testsuite/gas/i386/x86-64-apx-jmpabs-inval.s create mode 100644 gas/testsuite/gas/i386/x86-64-apx-jmpabs.d create mode 100644 gas/testsuite/gas/i386/x86-64-apx-jmpabs.s create mode 100644 gas/testsuite/gas/i386/x86-64-apx-ndd-optimize.d create mode 100644 gas/testsuite/gas/i386/x86-64-apx-ndd-optimize.s create mode 100644 gas/testsuite/gas/i386/x86-64-apx-ndd.d create mode 100644 gas/testsuite/gas/i386/x86-64-apx-ndd.s create mode 100644 gas/testsuite/gas/i386/x86-64-apx-push2pop2-intel.d create mode 100644 gas/testsuite/gas/i386/x86-64-apx-push2pop2-inval.l create mode 100644 gas/testsuite/gas/i386/x86-64-apx-push2pop2-inval.s create mode 100644 gas/testsuite/gas/i386/x86-64-apx-push2pop2.d create mode 100644 gas/testsuite/gas/i386/x86-64-apx-push2pop2.s create mode 100644 gas/testsuite/gas/i386/x86-64-apx-pushp-popp-intel.d create mode 100644 gas/testsuite/gas/i386/x86-64-apx-pushp-popp-inval.l create mode 100644 gas/testsuite/gas/i386/x86-64-apx-pushp-popp-inval.s create mode 100644 gas/testsuite/gas/i386/x86-64-apx-pushp-popp.d create mode 100644 gas/testsuite/gas/i386/x86-64-apx-pushp-popp.s create mode 100644 gas/testsuite/gas/i386/x86-64-apx-rex2.d create mode 100644 gas/testsuite/gas/i386/x86-64-apx-rex2.s create mode 100644 opcodes/i386-dis-evex-x86-64.h