public inbox for binutils-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] x86: exclude certain ISA extensions from v3/v4 ISA
@ 2022-06-03  8:17 Jan Beulich
  0 siblings, 0 replies; only message in thread
From: Jan Beulich @ 2022-06-03  8:17 UTC (permalink / raw)
  To: bfd-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a98600052eb680249abae0083a7c24d7e57f7379

commit a98600052eb680249abae0083a7c24d7e57f7379
Author: Jan Beulich <jbeulich@suse.com>
Date:   Fri Jun 3 10:17:35 2022 +0200

    x86: exclude certain ISA extensions from v3/v4 ISA
    
    Like TBM and LWP, XOP and FMA4 also shouldn't be included in v3.
    
    Like AVX512-4VNNIW, AVX512-4FMAPS also shouldn't be included in v4.

Diff:
---
 gas/config/tc-i386.c                        | 11 +++++++----
 gas/testsuite/gas/i386/i386.exp             |  3 +++
 gas/testsuite/gas/i386/property-v4fmaddps.d |  9 +++++++++
 gas/testsuite/gas/i386/property-v4fmaddps.s |  2 ++
 gas/testsuite/gas/i386/property-vfmaddps.d  |  9 +++++++++
 gas/testsuite/gas/i386/property-vfmaddps.s  |  2 ++
 gas/testsuite/gas/i386/property-vpcmov.d    |  9 +++++++++
 gas/testsuite/gas/i386/property-vpcmov.s    |  2 ++
 8 files changed, 43 insertions(+), 4 deletions(-)

diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index a3c64439b1b..5d486570bf8 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -9579,12 +9579,14 @@ output_insn (void)
 	x86_isa_1_used |= GNU_PROPERTY_X86_ISA_1_V2;
       if (i.tm.cpu_flags.bitfield.cpuavx
 	  || i.tm.cpu_flags.bitfield.cpuavx2
-	  /* Any VEX encoded insns execpt for CpuAVX512F, CpuAVX512BW,
-	     CpuAVX512DQ, LPW, TBM and AMX.  */
+	  /* Any VEX encoded insns execpt for AVX512F, AVX512BW, AVX512DQ,
+	     XOP, FMA4, LPW, TBM, and AMX.  */
 	  || (i.tm.opcode_modifier.vex
 	      && !i.tm.cpu_flags.bitfield.cpuavx512f
 	      && !i.tm.cpu_flags.bitfield.cpuavx512bw
 	      && !i.tm.cpu_flags.bitfield.cpuavx512dq
+	      && !i.tm.cpu_flags.bitfield.cpuxop
+	      && !i.tm.cpu_flags.bitfield.cpufma4
 	      && !i.tm.cpu_flags.bitfield.cpulwp
 	      && !i.tm.cpu_flags.bitfield.cputbm
 	      && !(x86_feature_2_used & GNU_PROPERTY_X86_FEATURE_2_TMM))
@@ -9602,11 +9604,12 @@ output_insn (void)
 	  || i.tm.cpu_flags.bitfield.cpuavx512bw
 	  || i.tm.cpu_flags.bitfield.cpuavx512dq
 	  || i.tm.cpu_flags.bitfield.cpuavx512vl
-	  /* Any EVEX encoded insns except for AVX512ER, AVX512PF and
-	     VNNIW.  */
+	  /* Any EVEX encoded insns except for AVX512ER, AVX512PF,
+	     AVX512-4FMAPS, and AVX512-4VNNIW.  */
 	  || (i.tm.opcode_modifier.evex
 	      && !i.tm.cpu_flags.bitfield.cpuavx512er
 	      && !i.tm.cpu_flags.bitfield.cpuavx512pf
+	      && !i.tm.cpu_flags.bitfield.cpuavx512_4fmaps
 	      && !i.tm.cpu_flags.bitfield.cpuavx512_4vnniw))
 	x86_isa_1_used |= GNU_PROPERTY_X86_ISA_1_V4;
     }
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index 1e10277da31..99a11ebde78 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -755,7 +755,10 @@ if {[is_elf_format] || [istarget "*-*-vxworks*"]} then {
     run_dump_test "property-cvtpi2pd"
     run_dump_test "property-cvtpi2ps"
     run_dump_test "property-ldmxcsr"
+    run_dump_test "property-v4fmaddps"
+    run_dump_test "property-vfmaddps"
     run_dump_test "property-vldmxcsr"
+    run_dump_test "property-vpcmov"
     run_dump_test "property-vzeroall"
     run_dump_test "code16-2"
 
diff --git a/gas/testsuite/gas/i386/property-v4fmaddps.d b/gas/testsuite/gas/i386/property-v4fmaddps.d
new file mode 100644
index 00000000000..923ec0988a1
--- /dev/null
+++ b/gas/testsuite/gas/i386/property-v4fmaddps.d
@@ -0,0 +1,9 @@
+#name: i386 property v4fmaddps
+#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: x86-64-baseline
+	x86 feature used: x86, XMM, YMM, ZMM
diff --git a/gas/testsuite/gas/i386/property-v4fmaddps.s b/gas/testsuite/gas/i386/property-v4fmaddps.s
new file mode 100644
index 00000000000..43d3a3de867
--- /dev/null
+++ b/gas/testsuite/gas/i386/property-v4fmaddps.s
@@ -0,0 +1,2 @@
+	.text
+	v4fmaddps	(%eax), %zmm0, %zmm0
diff --git a/gas/testsuite/gas/i386/property-vfmaddps.d b/gas/testsuite/gas/i386/property-vfmaddps.d
new file mode 100644
index 00000000000..f6a92e9c400
--- /dev/null
+++ b/gas/testsuite/gas/i386/property-vfmaddps.d
@@ -0,0 +1,9 @@
+#name: i386 property vfmaddps
+#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: x86-64-baseline
+	x86 feature used: x86, XMM, YMM
diff --git a/gas/testsuite/gas/i386/property-vfmaddps.s b/gas/testsuite/gas/i386/property-vfmaddps.s
new file mode 100644
index 00000000000..c72df471fc2
--- /dev/null
+++ b/gas/testsuite/gas/i386/property-vfmaddps.s
@@ -0,0 +1,2 @@
+	.text
+	vfmaddps	%xmm0, %xmm0, %xmm0, %xmm0
diff --git a/gas/testsuite/gas/i386/property-vpcmov.d b/gas/testsuite/gas/i386/property-vpcmov.d
new file mode 100644
index 00000000000..f40fb8a325e
--- /dev/null
+++ b/gas/testsuite/gas/i386/property-vpcmov.d
@@ -0,0 +1,9 @@
+#name: i386 property vpcmov
+#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: x86-64-baseline
+	x86 feature used: x86, XMM, YMM
diff --git a/gas/testsuite/gas/i386/property-vpcmov.s b/gas/testsuite/gas/i386/property-vpcmov.s
new file mode 100644
index 00000000000..66270709e7f
--- /dev/null
+++ b/gas/testsuite/gas/i386/property-vpcmov.s
@@ -0,0 +1,2 @@
+	.text
+	vpcmov	%xmm0, %xmm0, %xmm0, %xmm0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-03  8:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-03  8:17 [binutils-gdb] x86: exclude certain ISA extensions from v3/v4 ISA Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).