From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1386) id 80E3C3858C33; Mon, 1 Aug 2022 08:53:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 80E3C3858C33 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Jan Beulich To: bfd-cvs@sourceware.org Subject: [binutils-gdb] x86: SKINIT with operand needs IgnoreSize X-Act-Checkin: binutils-gdb X-Git-Author: Jan Beulich X-Git-Refname: refs/heads/master X-Git-Oldrev: 20f2e2686c79a5ac951f0cc283f385c16bda5d50 X-Git-Newrev: e4971956eab2d3091e21918b175cb999a836c057 Message-Id: <20220801085325.80E3C3858C33@sourceware.org> Date: Mon, 1 Aug 2022 08:53:25 +0000 (GMT) X-BeenThere: binutils-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2022 08:53:25 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3De4971956eab2= d3091e21918b175cb999a836c057 commit e4971956eab2d3091e21918b175cb999a836c057 Author: Jan Beulich Date: Mon Aug 1 10:53:14 2022 +0200 x86: SKINIT with operand needs IgnoreSize =20 Without it in 16-bit mode a pointless operand size prefix would be emitted. Diff: --- gas/testsuite/gas/i386/i386.exp | 1 + gas/testsuite/gas/i386/svme.s | 3 +++ gas/testsuite/gas/i386/svme16.d | 41 +++++++++++++++++++++++++++++++++++++= ++++ opcodes/i386-opc.tbl | 2 +- opcodes/i386-tbl.h | 2 +- 5 files changed, 47 insertions(+), 2 deletions(-) diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.= exp index c7822c4c9ba..1d27dfc78b8 100644 --- a/gas/testsuite/gas/i386/i386.exp +++ b/gas/testsuite/gas/i386/i386.exp @@ -109,6 +109,7 @@ if [gas_32_check] then { run_list_test "cr-err" "" run_dump_test "cdr" run_dump_test "svme" + run_dump_test "svme16" run_dump_test "amdfam10" run_dump_test "ssse3" run_dump_test "rep" diff --git a/gas/testsuite/gas/i386/svme.s b/gas/testsuite/gas/i386/svme.s index a721e36777f..3d42fadeab4 100644 --- a/gas/testsuite/gas/i386/svme.s +++ b/gas/testsuite/gas/i386/svme.s @@ -1,4 +1,7 @@ .text +.ifdef __ia16__ + .code16 +.endif common: clgi invlpga diff --git a/gas/testsuite/gas/i386/svme16.d b/gas/testsuite/gas/i386/svme1= 6.d new file mode 100644 index 00000000000..bd3424f6a48 --- /dev/null +++ b/gas/testsuite/gas/i386/svme16.d @@ -0,0 +1,41 @@ +#as: --defsym __ia16__=3D1 +#objdump: -dw -Mi8086 +#name: 16-bit SVME +#source: svme.s + +.*: +file format .* + +Disassembly of section .text: + +0+000 : +[ ]*[0-9a-f]+:[ ]+0f 01 dd[ ]+clgi +[ ]*[0-9a-f]+:[ ]+0f 01 df[ ]+invlpga +[ ]*[0-9a-f]+:[ ]+0f 01 de[ ]+skinit +[ ]*[0-9a-f]+:[ ]+0f 01 dc[ ]+stgi +[ ]*[0-9a-f]+:[ ]+0f 01 da[ ]+vmload +[ ]*[0-9a-f]+:[ ]+0f 01 d9[ ]+vmmcall +[ ]*[0-9a-f]+:[ ]+0f 01 d8[ ]+vmrun +[ ]*[0-9a-f]+:[ ]+0f 01 db[ ]+vmsave +[0-9a-f]+ : +[ ]*[0-9a-f]+:[ ]+0f 01 de[ ]+skinit +[ ]*[0-9a-f]+:[ ]+67 0f 01 df[ ]+addr32 invlpga +[ ]*[0-9a-f]+:[ ]+67 0f 01 da[ ]+addr32 vmload +[ ]*[0-9a-f]+:[ ]+67 0f 01 d8[ ]+addr32 vmrun +[ ]*[0-9a-f]+:[ ]+67 0f 01 db[ ]+addr32 vmsave +[0-9a-f]+ : +[ ]*[0-9a-f]+:[ ]+0f 01 df[ ]+invlpga +[ ]*[0-9a-f]+:[ ]+0f 01 da[ ]+vmload +[ ]*[0-9a-f]+:[ ]+0f 01 d8[ ]+vmrun +[ ]*[0-9a-f]+:[ ]+0f 01 db[ ]+vmsave +[0-9a-f]+ : +[ ]*[0-9a-f]+:[ ]+0f 01 de[ ]+skinit +[ ]*[0-9a-f]+:[ ]+67 0f 01 df[ ]+addr32 invlpga +[ ]*[0-9a-f]+:[ ]+67 0f 01 da[ ]+addr32 vmload +[ ]*[0-9a-f]+:[ ]+67 0f 01 d8[ ]+addr32 vmrun +[ ]*[0-9a-f]+:[ ]+67 0f 01 db[ ]+addr32 vmsave +[0-9a-f]+ : +[ ]*[0-9a-f]+:[ ]+0f 01 df[ ]+invlpga +[ ]*[0-9a-f]+:[ ]+0f 01 da[ ]+vmload +[ ]*[0-9a-f]+:[ ]+0f 01 d8[ ]+vmrun +[ ]*[0-9a-f]+:[ ]+0f 01 db[ ]+vmsave +#pass diff --git a/opcodes/i386-opc.tbl b/opcodes/i386-opc.tbl index 94763f9f3e5..512235134b0 100644 --- a/opcodes/i386-opc.tbl +++ b/opcodes/i386-opc.tbl @@ -2068,7 +2068,7 @@ clgi, 0xf01dd, None, CpuSVME, No_bSuf|No_wSuf|No_lSuf= |No_sSuf|No_qSuf|No_ldSuf, invlpga, 0xf01df, None, CpuSVME, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|N= o_ldSuf, {} invlpga, 0xf01df, None, CpuSVME, AddrPrefixOpReg, { Acc|Word|Dword|Qword, = RegC|Dword } skinit, 0xf01de, None, CpuSVME, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No= _ldSuf, {} -skinit, 0xf01de, None, CpuSVME, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No= _ldSuf, { Acc|Dword } +skinit, 0xf01de, None, CpuSVME, No_bSuf|IgnoreSize|No_wSuf|No_lSuf|No_sSuf= |No_qSuf|No_ldSuf, { Acc|Dword } stgi, 0xf01dc, None, CpuSVME, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_l= dSuf, {} vmgexit, 0xf30f01d9, None, CpuSEV_ES, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_q= Suf|No_ldSuf, {} vmload, 0xf01da, None, CpuSVME, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No= _ldSuf, {} diff --git a/opcodes/i386-tbl.h b/opcodes/i386-tbl.h index ebf5414bc74..7df3b29ce15 100644 --- a/opcodes/i386-tbl.h +++ b/opcodes/i386-tbl.h @@ -44880,7 +44880,7 @@ const insn_template i386_optab[] =3D { { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } } } }, { "skinit", 0x01de, 1, None, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, + { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,