x86/Intel: extend MOVDIRI testing
authorJan Beulich <jbeulich@suse.com>
Wed, 4 Dec 2019 09:41:43 +0000 (10:41 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 4 Dec 2019 09:41:43 +0000 (10:41 +0100)
Test also memory operands with operand size specifier, which was broken
prior to dc2be329b950 ("i386: Only check suffix in instruction
mnemonic"), due to the template not permitting any suffixes. Note that
this uncovered a disassembler issue, which is being fixed here as well.

gas/ChangeLog
gas/testsuite/gas/i386/movdir-intel.d
gas/testsuite/gas/i386/movdir.d
gas/testsuite/gas/i386/movdir.s
gas/testsuite/gas/i386/x86-64-movdir-intel.d
gas/testsuite/gas/i386/x86-64-movdir.d
gas/testsuite/gas/i386/x86-64-movdir.s
opcodes/ChangeLog
opcodes/i386-dis.c

index 411d66fd94d7f9726546b70dc644167c3c9c9b24..b7d305f60c5b1aaf049d12f0cf73e155938f6e09 100644 (file)
@@ -1,3 +1,14 @@
+2019-12-04  Jan Beulich  <jbeulich@suse.com>
+
+       * testsuite/gas/i386/movdir.s: Add Intel syntax case with
+       operand size specifier.
+       * testsuite/gas/i386/x86-64-movdir.s: Add Intel syntax cases
+       with operand size specifier and wit 32-bit operands.
+       * testsuite/gas/i386/movdir-intel.d,
+       testsuite/gas/i386/movdir.d,
+       testsuite/gas/i386/x86-64-movdir-intel.d,
+       testsuite/gas/i386/x86-64-movdir.d: Adjust expectations.
+
 2019-12-04  Jan Beulich  <jbeulich@suse.com>
 
        * config/tc-i386.c (process_suffix): Arrange for insns with a
index d6eab9c0c24b7be2c1459fa329311beafcffc084..be721ba443c4d4db494d622a043caa941db6a4d8 100644 (file)
@@ -13,6 +13,7 @@ Disassembly of section \.text:
 [      ]*[a-f0-9]+:[   ]*66 0f 38 f8 01[       ]*movdir64b eax,\[ecx\]
 [      ]*[a-f0-9]+:[   ]*67 66 0f 38 f8 04[    ]*movdir64b ax,\[si\]
 [      ]*[a-f0-9]+:[   ]*0f 38 f9 01[  ]*movdiri DWORD PTR \[ecx\],eax
+[      ]*[a-f0-9]+:[   ]*0f 38 f9 01[  ]*movdiri DWORD PTR \[ecx\],eax
 [      ]*[a-f0-9]+:[   ]*66 0f 38 f8 01[       ]*movdir64b eax,\[ecx\]
 [      ]*[a-f0-9]+:[   ]*67 66 0f 38 f8 04[    ]*movdir64b ax,\[si\]
 #pass
index 852b20d8a3905dac27b16cdab77b29168dd729ab..c70b756e37f99f7a95f0885c92f8eefe615179ab 100644 (file)
@@ -13,6 +13,7 @@ Disassembly of section \.text:
 [      ]*[a-f0-9]+:[   ]*66 0f 38 f8 01[       ]*movdir64b \(%ecx\),%eax
 [      ]*[a-f0-9]+:[   ]*67 66 0f 38 f8 04[    ]*movdir64b \(%si\),%ax
 [      ]*[a-f0-9]+:[   ]*0f 38 f9 01[  ]*movdiri %eax,\(%ecx\)
+[      ]*[a-f0-9]+:[   ]*0f 38 f9 01[  ]*movdiri %eax,\(%ecx\)
 [      ]*[a-f0-9]+:[   ]*66 0f 38 f8 01[       ]*movdir64b \(%ecx\),%eax
 [      ]*[a-f0-9]+:[   ]*67 66 0f 38 f8 04[    ]*movdir64b \(%si\),%ax
 #pass
index 28dfa6154a1c4430938014e52a5a5a7eeedc0f56..5ea4bb5175fd94875d4a4e7cf73a572ac48cff48 100644 (file)
@@ -9,5 +9,6 @@ _start:
 
        .intel_syntax noprefix
        movdiri [ecx], eax
+       movdiri dword ptr [ecx], eax
        movdir64b eax,[ecx]
        movdir64b ax,[si]
index f6c2548d1c5f4be49b906e4f805e66641c8dc957..0f3a5abd610d39fdc00e27fa61985856aa3715df 100644 (file)
@@ -12,6 +12,9 @@ Disassembly of section \.text:
 [      ]*[a-f0-9]+:[   ]*48 0f 38 f9 01[       ]*movdiri QWORD PTR \[rcx\],rax
 [      ]*[a-f0-9]+:[   ]*66 0f 38 f8 01[       ]*movdir64b rax,\[rcx\]
 [      ]*[a-f0-9]+:[   ]*67 66 0f 38 f8 01[    ]*movdir64b eax,\[ecx]
+[      ]*[a-f0-9]+:[   ]*0f 38 f9 01[  ]*movdiri DWORD PTR \[rcx\],eax
+[      ]*[a-f0-9]+:[   ]*48 0f 38 f9 01[       ]*movdiri QWORD PTR \[rcx\],rax
+[      ]*[a-f0-9]+:[   ]*0f 38 f9 01[  ]*movdiri DWORD PTR \[rcx\],eax
 [      ]*[a-f0-9]+:[   ]*48 0f 38 f9 01[       ]*movdiri QWORD PTR \[rcx\],rax
 [      ]*[a-f0-9]+:[   ]*66 0f 38 f8 01[       ]*movdir64b rax,\[rcx\]
 [      ]*[a-f0-9]+:[   ]*67 66 0f 38 f8 01[    ]*movdir64b eax,\[ecx\]
index fd7f4e586472e22c66246b9762675e20dee173e3..2deab8928e666c5037b8d83ae0d50d45a7fba0ac 100644 (file)
@@ -12,6 +12,9 @@ Disassembly of section \.text:
 [      ]*[a-f0-9]+:[   ]*48 0f 38 f9 01[       ]*movdiri %rax,\(%rcx\)
 [      ]*[a-f0-9]+:[   ]*66 0f 38 f8 01[       ]*movdir64b \(%rcx\),%rax
 [      ]*[a-f0-9]+:[   ]*67 66 0f 38 f8 01[    ]*movdir64b \(%ecx\),%eax
+[      ]*[a-f0-9]+:[   ]*0f 38 f9 01[  ]*movdiri %eax,\(%rcx\)
+[      ]*[a-f0-9]+:[   ]*48 0f 38 f9 01[       ]*movdiri %rax,\(%rcx\)
+[      ]*[a-f0-9]+:[   ]*0f 38 f9 01[  ]*movdiri %eax,\(%rcx\)
 [      ]*[a-f0-9]+:[   ]*48 0f 38 f9 01[       ]*movdiri %rax,\(%rcx\)
 [      ]*[a-f0-9]+:[   ]*66 0f 38 f8 01[       ]*movdir64b \(%rcx\),%rax
 [      ]*[a-f0-9]+:[   ]*67 66 0f 38 f8 01[    ]*movdir64b \(%ecx\),%eax
index f0fe2679787654c5dbd26d49ef44e3a99a11635c..6f9032dc4b34354ee1ec4fade597366dd43a6ef4 100644 (file)
@@ -8,6 +8,9 @@ _start:
        movdir64b (%ecx),%eax
 
        .intel_syntax noprefix
+       movdiri [rcx],eax
        movdiri [rcx],rax
+       movdiri dword ptr [rcx],eax
+       movdiri qword ptr [rcx],rax
        movdir64b rax,[rcx]
        movdir64b eax,[ecx]
index 79f12e936581d74bac7f62480d4628d73405dc0f..162ff0492e051c2e5c2d2525e8404b74dceded2f 100644 (file)
@@ -1,3 +1,7 @@
+2019-12-04  Jan Beulich  <jbeulich@suse.com>
+
+       * i386-dis.c (mod_table): Use Ev instead of Em for movdiri.
+
 2019-12-04  Jan Beulich  <jbeulich@suse.com>
 
        * i386-opc.tbl (push, pop): Drop DefaultSize from GPR-only
index 6b08dd6bde87ba340085bcfe1c14cd8462ad38c9..2a0e765c55a88827d4dce0c626e1df3a705d18ec 100644 (file)
@@ -10522,7 +10522,7 @@ static const struct dis386 mod_table[][2] = {
   },
   {
     /* MOD_0F38F9_PREFIX_0 */
-    { "movdiri",       { Em, Gv }, PREFIX_OPCODE },
+    { "movdiri",       { Ev, Gv }, PREFIX_OPCODE },
   },
   {
     /* MOD_62_32BIT */
This page took 0.032168 seconds and 4 git commands to generate.