]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
x86: Mark cvtpi2ps and cvtpi2pd as MMX
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 19 Feb 2020 12:54:45 +0000 (04:54 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 19 Feb 2020 12:54:45 +0000 (04:54 -0800)
* config/tc-i386.c (output_insn): Mark cvtpi2ps and cvtpi2pd
with GNU_PROPERTY_X86_FEATURE_2_MMX.
* testsuite/gas/i386/i386.exp: Run property-3 and
x86-64-property-3.
* testsuite/gas/i386/property-3.d: New file.
* testsuite/gas/i386/property-3.s: Likewise.
* testsuite/gas/i386/x86-64-property-3.d: Likewise.

gas/ChangeLog
gas/config/tc-i386.c
gas/testsuite/gas/i386/i386.exp
gas/testsuite/gas/i386/property-3.d [new file with mode: 0644]
gas/testsuite/gas/i386/property-3.s [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-property-3.d [new file with mode: 0644]

index 095e457822f7a0e91c12b9128265138cc4cc9910..56262742f0f68ef1f59e1b2f3424462b39ab203e 100644 (file)
@@ -1,3 +1,13 @@
+2020-02-19  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * config/tc-i386.c (output_insn): Mark cvtpi2ps and cvtpi2pd
+       with GNU_PROPERTY_X86_FEATURE_2_MMX.
+       * testsuite/gas/i386/i386.exp: Run property-3 and
+       x86-64-property-3.
+       * testsuite/gas/i386/property-3.d: New file.
+       * testsuite/gas/i386/property-3.s: Likewise.
+       * testsuite/gas/i386/x86-64-property-3.d: Likewise.
+
 2020-02-17  H.J. Lu  <hongjiu.lu@intel.com>
 
        * config/tc-i386.c (cpu_arch): Add .popcnt.
index f559ad4103f19839cc581278d4b33e4ae120dfaa..d118fdd567a0400e24d32dd49e72df743198face 100644 (file)
@@ -8636,7 +8636,9 @@ output_insn (void)
        x86_feature_2_used |= GNU_PROPERTY_X86_FEATURE_2_X87;
       if (i.has_regmmx
          || i.tm.base_opcode == 0xf77 /* emms */
-         || i.tm.base_opcode == 0xf0e /* femms */)
+         || i.tm.base_opcode == 0xf0e /* femms */
+         || i.tm.base_opcode == 0xf2a /* cvtpi2ps */
+         || i.tm.base_opcode == 0x660f2a /* cvtpi2pd */)
        x86_feature_2_used |= GNU_PROPERTY_X86_FEATURE_2_MMX;
       if (i.has_regxmm)
        x86_feature_2_used |= GNU_PROPERTY_X86_FEATURE_2_XMM;
index d884f8936451005c3d3301b53b1c62f4b4bef60b..685e62ea729f4157797453d8a946589904f53b19 100644 (file)
@@ -601,6 +601,7 @@ if [expr ([istarget "i*86-*-*"] ||  [istarget "x86_64-*-*"]) && [gas_32_check]]
        run_dump_test "evex-no-scale-32"
        run_dump_test "property-1"
        run_dump_test "property-2"
+       run_dump_test "property-3"
 
        if {[istarget "*-*-linux*"]} then {
            run_dump_test "align-branch-3"
@@ -1166,6 +1167,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t
        run_dump_test "evex-no-scale-64"
        run_dump_test "x86-64-property-1"
        run_dump_test "x86-64-property-2"
+       run_dump_test "x86-64-property-3"
 
        if {[istarget "*-*-linux*"]} then {
            run_dump_test "x86-64-align-branch-3"
diff --git a/gas/testsuite/gas/i386/property-3.d b/gas/testsuite/gas/i386/property-3.d
new file mode 100644 (file)
index 0000000..36d2155
--- /dev/null
@@ -0,0 +1,9 @@
+#name: i386 property 3
+#as: -mx86-used-note=yes --generate-missing-build-notes=no
+#readelf: -n
+
+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: SSE
+       x86 feature used: x86, MMX, XMM
diff --git a/gas/testsuite/gas/i386/property-3.s b/gas/testsuite/gas/i386/property-3.s
new file mode 100644 (file)
index 0000000..c42bdcb
--- /dev/null
@@ -0,0 +1,2 @@
+       .text
+       cvtpi2ps (%eax), %xmm0
diff --git a/gas/testsuite/gas/i386/x86-64-property-3.d b/gas/testsuite/gas/i386/x86-64-property-3.d
new file mode 100644 (file)
index 0000000..aa116e0
--- /dev/null
@@ -0,0 +1,10 @@
+#name: x86-64 property 3
+#source: property-3.s
+#as: -mx86-used-note=yes --generate-missing-build-notes=no
+#readelf: -n
+
+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: SSE
+       x86 feature used: x86, MMX, XMM