aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorIgor Tsimbalist <igor.v.tsimbalist@intel.com>2018-01-23 19:39:05 +0300
committerIgor Tsimbalist <igor.v.tsimbalist@intel.com>2018-01-23 20:05:33 +0300
commit3233d7d074e59b83f68a22071cff597f00d5ae81 (patch)
tree624dbdd63e269a8c272c8b39061c0fc8592da026 /gas
parentb4f6242e95340a31b0519187c5fc329056ddecfd (diff)
downloadfsf-binutils-gdb-3233d7d074e59b83f68a22071cff597f00d5ae81.zip
fsf-binutils-gdb-3233d7d074e59b83f68a22071cff597f00d5ae81.tar.gz
fsf-binutils-gdb-3233d7d074e59b83f68a22071cff597f00d5ae81.tar.bz2
Enable Intel WBNOINVD instruction.
Intel has disclosed a set of new instructions for Icelake processor. The spec is https://software.intel.com/sites/default/files/managed/c5/15/architecture-instruction-set-extensions-programming-reference.pdf This patch enables Intel WBNOINVD instruction. gas/ * config/tc-i386.c (cpu_arch): Add .wbnoinvd. * doc/c-i386.texi: Document .wbnoinvd. * testsuite/gas/i386/i386.exp: Add WBNOINVD tests. * testsuite/gas/i386/wbnoinvd-intel.d: New test. * testsuite/gas/i386/wbnoinvd.d: Likewise. * testsuite/gas/i386/wbnoinvd.s: Likewise. * testsuite/gas/i386/x86-64-wbnoinvd-intel.d: Likewise. * testsuite/gas/i386/x86-64-wbnoinvd.d: Likewise. * testsuite/gas/i386/x86-64-wbnoinvd.s: Likewise. opcodes/ * i386-dis.c (enum): Add PREFIX_0F09. * i386-gen.c (cpu_flag_init): Add CPU_WBNOINVD_FLAGS. (cpu_flags): Add CpuWBNOINVD. * i386-opc.h (enum): Add CpuWBNOINVD. (i386_cpu_flags): Add cpuwbnoinvd. * i386-opc.tbl: Add WBNOINVD instruction. * i386-init.h: Regenerate. * i386-tbl.h: Likewise.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog12
-rw-r--r--gas/config/tc-i386.c2
-rw-r--r--gas/doc/c-i386.texi2
-rw-r--r--gas/testsuite/gas/i386/i386.exp4
-rw-r--r--gas/testsuite/gas/i386/wbnoinvd-intel.d11
-rw-r--r--gas/testsuite/gas/i386/wbnoinvd.d11
-rw-r--r--gas/testsuite/gas/i386/wbnoinvd.s5
-rw-r--r--gas/testsuite/gas/i386/x86-64-wbnoinvd-intel.d11
-rw-r--r--gas/testsuite/gas/i386/x86-64-wbnoinvd.d11
-rw-r--r--gas/testsuite/gas/i386/x86-64-wbnoinvd.s5
10 files changed, 74 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index a881afc..3ec3122 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,15 @@
+2018-01-23 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
+
+ * config/tc-i386.c (cpu_arch): Add .wbnoinvd.
+ * doc/c-i386.texi: Document .wbnoinvd.
+ * testsuite/gas/i386/i386.exp: Add WBNOINVD tests.
+ * testsuite/gas/i386/wbnoinvd-intel.d: New test.
+ * testsuite/gas/i386/wbnoinvd.d: Likewise.
+ * testsuite/gas/i386/wbnoinvd.s: Likewise.
+ * testsuite/gas/i386/x86-64-wbnoinvd-intel.d: Likewise.
+ * testsuite/gas/i386/x86-64-wbnoinvd.d: Likewise.
+ * testsuite/gas/i386/x86-64-wbnoinvd.s: Likewise.
+
2018-01-23 Maciej W. Rozycki <macro@mips.com>
* config/tc-mips.c (md_show_usage): Correctly indicate the
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index cd69321..c629af1 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -1007,6 +1007,8 @@ static const arch_entry cpu_arch[] =
CPU_VAES_FLAGS, 0 },
{ STRING_COMMA_LEN (".vpclmulqdq"), PROCESSOR_UNKNOWN,
CPU_VPCLMULQDQ_FLAGS, 0 },
+ { STRING_COMMA_LEN (".wbnoinvd"), PROCESSOR_UNKNOWN,
+ CPU_WBNOINVD_FLAGS, 0 },
};
static const noarch_entry cpu_noarch[] =
diff --git a/gas/doc/c-i386.texi b/gas/doc/c-i386.texi
index 73d6bb1..a671be8 100644
--- a/gas/doc/c-i386.texi
+++ b/gas/doc/c-i386.texi
@@ -229,6 +229,7 @@ accept various extension mnemonics. For example,
@code{clflush},
@code{mwaitx},
@code{clzero},
+@code{wbnoinvd},
@code{lwp},
@code{fma4},
@code{xop},
@@ -1240,6 +1241,7 @@ supported on the CPU specified. The choices for @var{cpu_type} are:
@item @samp{.avx512_vpopcntdq} @tab @samp{.avx512_vbmi2} @tab @samp{.avx512_vnni}
@item @samp{.avx512_bitalg}
@item @samp{.clwb} @tab @samp{.rdpid} @tab @samp{.ptwrite} @tab @item @samp{.ibt}
+@item @samp{.wbnoinvd}
@item @samp{.shstk} @tab @samp{.gfni} @tab @samp{.vaes} @tab @samp{.vpclmulqdq}
@item @samp{.3dnow} @tab @samp{.3dnowa} @tab @samp{.sse4a} @tab @samp{.sse5}
@item @samp{.syscall} @tab @samp{.rdtscp} @tab @samp{.svme} @tab @samp{.abm}
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index b81cc20..4123cd8 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -413,6 +413,8 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]]
run_dump_test "vaes-intel"
run_dump_test "vpclmulqdq"
run_dump_test "vpclmulqdq-intel"
+ run_dump_test "wbnoinvd"
+ run_dump_test "wbnoinvd-intel"
run_list_test "avx512vl-1" "-al"
run_list_test "avx512vl-2" "-al"
run_dump_test "fpu-bad"
@@ -880,6 +882,8 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t
run_dump_test "x86-64-vaes-intel"
run_dump_test "x86-64-vpclmulqdq"
run_dump_test "x86-64-vpclmulqdq-intel"
+ run_dump_test "x86-64-wbnoinvd"
+ run_dump_test "x86-64-wbnoinvd-intel"
run_dump_test "x86-64-fence-as-lock-add-yes"
run_dump_test "x86-64-fence-as-lock-add-no"
run_dump_test "x86-64-pr20141"
diff --git a/gas/testsuite/gas/i386/wbnoinvd-intel.d b/gas/testsuite/gas/i386/wbnoinvd-intel.d
new file mode 100644
index 0000000..34d390e
--- /dev/null
+++ b/gas/testsuite/gas/i386/wbnoinvd-intel.d
@@ -0,0 +1,11 @@
+#objdump: -dwMintel
+#name: i386 WBNOINVD (Intel disassembly)
+#source: wbnoinvd.s
+
+.*: +file format .*
+
+Disassembly of section .text:
+
+0+ <_start>:
+[ ]*[a-f0-9]+:[ ]*f3 0f 09[ ]*wbnoinvd[ ]*
+#pass
diff --git a/gas/testsuite/gas/i386/wbnoinvd.d b/gas/testsuite/gas/i386/wbnoinvd.d
new file mode 100644
index 0000000..051b3d0
--- /dev/null
+++ b/gas/testsuite/gas/i386/wbnoinvd.d
@@ -0,0 +1,11 @@
+#objdump: -dw
+#name: i386 WBNOINVD insn
+
+.*: +file format .*
+
+
+Disassembly of section .text:
+
+0+ <_start>:
+[ ]*[a-f0-9]+:[ ]*f3 0f 09[ ]*wbnoinvd[ ]*
+#pass
diff --git a/gas/testsuite/gas/i386/wbnoinvd.s b/gas/testsuite/gas/i386/wbnoinvd.s
new file mode 100644
index 0000000..28f9ae3
--- /dev/null
+++ b/gas/testsuite/gas/i386/wbnoinvd.s
@@ -0,0 +1,5 @@
+# Check 32bit WBNOINVD instructions.
+
+ .text
+_start:
+ wbnoinvd
diff --git a/gas/testsuite/gas/i386/x86-64-wbnoinvd-intel.d b/gas/testsuite/gas/i386/x86-64-wbnoinvd-intel.d
new file mode 100644
index 0000000..34d390e
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-wbnoinvd-intel.d
@@ -0,0 +1,11 @@
+#objdump: -dwMintel
+#name: i386 WBNOINVD (Intel disassembly)
+#source: wbnoinvd.s
+
+.*: +file format .*
+
+Disassembly of section .text:
+
+0+ <_start>:
+[ ]*[a-f0-9]+:[ ]*f3 0f 09[ ]*wbnoinvd[ ]*
+#pass
diff --git a/gas/testsuite/gas/i386/x86-64-wbnoinvd.d b/gas/testsuite/gas/i386/x86-64-wbnoinvd.d
new file mode 100644
index 0000000..051b3d0
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-wbnoinvd.d
@@ -0,0 +1,11 @@
+#objdump: -dw
+#name: i386 WBNOINVD insn
+
+.*: +file format .*
+
+
+Disassembly of section .text:
+
+0+ <_start>:
+[ ]*[a-f0-9]+:[ ]*f3 0f 09[ ]*wbnoinvd[ ]*
+#pass
diff --git a/gas/testsuite/gas/i386/x86-64-wbnoinvd.s b/gas/testsuite/gas/i386/x86-64-wbnoinvd.s
new file mode 100644
index 0000000..c0359bf
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-wbnoinvd.s
@@ -0,0 +1,5 @@
+# Check 64bit WBNOINVD instructions.
+
+ .text
+_start:
+ wbnoinvd