x86: honor template rather than actual operands when updating i.xstate
authorJan Beulich <jbeulich@suse.com>
Tue, 16 Feb 2021 10:33:04 +0000 (11:33 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 16 Feb 2021 10:33:04 +0000 (11:33 +0100)
This undoes a change to md_assemble() that 32930e4edbc0 ("x86: Support
GNU_PROPERTY_X86_ISA_1_V[234] marker") did without any explanation. This
broke a CVTPI2PS property test that a subsequent test will add, and the
updates to existing tests also demonstrate what was wrong: For example,
AVX insns update the full YMM, even if a Vex128 variant is in use.

gas/ChangeLog
gas/config/tc-i386.c
gas/testsuite/gas/i386/property-12.d
gas/testsuite/gas/i386/property-4.d
gas/testsuite/gas/i386/property-5.d

index a269303e0805337353b2542276d0f84d4c03044f..443511f91c389d1e0352d4256947cd560d3a0a00 100644 (file)
@@ -1,3 +1,11 @@
+2021-02-16  Jan Beulich  <jbeulich@suse.com>
+
+       * config/tc-i386.c (md_assemble): Use template rather than
+       actuals when updating i.xstate.
+       * testsuite/gas/i386/property-4.d,
+       testsuite/gas/i386/property-5.d,
+       testsuite/gas/i386/property-12.d: Adjust expectations.
+
 2021-02-16  Jan Beulich  <jbeulich@suse.com>
 
        * config/tc-i386.c (output_insn): Handle ldmxcsr, stmxcsr,
index 94783f51550fa3bebe6ff39916a61662eae0d54d..2aaffff21871d21f9b57911239f4ef2f50f777f1 100644 (file)
@@ -4874,7 +4874,7 @@ md_assemble (char *line)
   for (j = 0; j < i.operands; j++)
     {
       i.types[j] = operand_type_and (i.types[j], i.tm.operand_types[j]);
-      switch (i.types[j].bitfield.class)
+      switch (i.tm.operand_types[j].bitfield.class)
        {
        default:
          break;
@@ -4885,13 +4885,13 @@ md_assemble (char *line)
          i.xstate |= xstate_mask;
          break;
        case RegSIMD:
-         if (i.types[j].bitfield.tmmword)
+         if (i.tm.operand_types[j].bitfield.tmmword)
            i.xstate |= xstate_tmm;
-         else if (i.types[j].bitfield.zmmword)
+         else if (i.tm.operand_types[j].bitfield.zmmword)
            i.xstate |= xstate_zmm;
-         else if (i.types[j].bitfield.ymmword)
+         else if (i.tm.operand_types[j].bitfield.ymmword)
            i.xstate |= xstate_ymm;
-         else if (i.types[j].bitfield.xmmword)
+         else if (i.tm.operand_types[j].bitfield.xmmword)
            i.xstate |= xstate_xmm;
          break;
        }
index 1a5c2978075420f9d2937c6a985a2613e829978d..1cb010aab6736eee744ae9eabb6536843b0e386e 100644 (file)
@@ -6,4 +6,4 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x[0-9a-f]+     NT_GNU_PROPERTY_TYPE_0
       Properties: x86 ISA used: x86-64-baseline, x86-64-v4
-       x86 feature used: x86, XMM, MASK
+       x86 feature used: x86, XMM, YMM, ZMM, MASK
index 46450c87af402db80e789c936bad91740fd29b4b..3345c17eb1d1183183225d04da293d91b9a4e840 100644 (file)
@@ -6,4 +6,4 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x[0-9a-f]+     NT_GNU_PROPERTY_TYPE_0
       Properties: x86 ISA used: x86-64-baseline, x86-64-v3
-       x86 feature used: x86, XMM
+       x86 feature used: x86, XMM, YMM
index c04a6b84f5dabc8d479be4a88ee6f7a8e6ed243d..cad4a4d3ff05f3115d5c4b87bcf7a798cfda40b3 100644 (file)
@@ -6,4 +6,4 @@ Displaying notes found in: .note.gnu.property
 [      ]+Owner[        ]+Data size[    ]+Description
   GNU                  0x[0-9a-f]+     NT_GNU_PROPERTY_TYPE_0
       Properties: x86 ISA used: x86-64-baseline, x86-64-v4
-       x86 feature used: x86, XMM
+       x86 feature used: x86, XMM, YMM, ZMM