aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorLiliCui <lili.cui@intel.com>2020-03-06 14:38:15 +0800
committerH.J. Lu <hjl.tools@gmail.com>2020-04-02 05:48:36 -0700
commit4b27d27c07a9514d5f6d0876f659a32378fb4801 (patch)
treeda3b088be2f145fc465f8bdc44d3ce217bed8408 /gas
parent516231b7c7278e4e5a726cff1f798beb4bbce73c (diff)
downloadgdb-4b27d27c07a9514d5f6d0876f659a32378fb4801.zip
gdb-4b27d27c07a9514d5f6d0876f659a32378fb4801.tar.gz
gdb-4b27d27c07a9514d5f6d0876f659a32378fb4801.tar.bz2
Add support for intel SERIALIZE instruction
gas/ * config/tc-i386.c (cpu_arch): Add .serialize. (cpu_noarch): Likewise. * doc/c-i386.texi: Document serialize. * testsuite/gas/i386/i386.exp: Run serialize tests * testsuite/gas/i386/serialize.d: Likewise. * testsuite/gas/i386/x86-64-serialize.d: Likewise. * testsuite/gas/i386/serialize.s: Likewise. opcodes/ * i386-dis.c (prefix_table): New instructions serialize. * i386-gen.c (cpu_flag_init): Add CPU_SERIALIZE_FLAGS, CPU_ANY_SERIALIZE_FLAGS. (cpu_flags): Add CpuSERIALIZE. * i386-opc.h (enum): Add CpuSERIALIZE. (i386_cpu_flags): Add cpuserialize. * i386-opc.tbl: Add SERIALIZE insns. * i386-init.h: Regenerate. * i386-tbl.h: Likewise.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog10
-rw-r--r--gas/config/tc-i386.c3
-rw-r--r--gas/doc/c-i386.texi2
-rw-r--r--gas/testsuite/gas/i386/i386.exp2
-rw-r--r--gas/testsuite/gas/i386/serialize.d12
-rw-r--r--gas/testsuite/gas/i386/serialize.s5
-rw-r--r--gas/testsuite/gas/i386/x86-64-serialize.d12
7 files changed, 46 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 93e44c5..ca26b79 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,13 @@
+2020-04-02 Lili Cui <lili.cui@intel.com>
+
+ * config/tc-i386.c (cpu_arch): Add .serialize.
+ (cpu_noarch): Likewise.
+ * doc/c-i386.texi: Document serialize.
+ * testsuite/gas/i386/i386.exp: Run serialize tests
+ * testsuite/gas/i386/serialize.d: Likewise.
+ * testsuite/gas/i386/x86-64-serialize.d: Likewise.
+ * testsuite/gas/i386/serialize.s: Likewise.
+
2020-04-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* testsuite/gas/elf/section12a.d: Use notarget instead of xfail.
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 09063f7..d67532c 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -1206,6 +1206,8 @@ static const arch_entry cpu_arch[] =
CPU_AVX512_VP2INTERSECT_FLAGS, 0 },
{ STRING_COMMA_LEN (".enqcmd"), PROCESSOR_UNKNOWN,
CPU_ENQCMD_FLAGS, 0 },
+ { STRING_COMMA_LEN (".serialize"), PROCESSOR_UNKNOWN,
+ CPU_SERIALIZE_FLAGS, 0 },
{ STRING_COMMA_LEN (".rdpru"), PROCESSOR_UNKNOWN,
CPU_RDPRU_FLAGS, 0 },
{ STRING_COMMA_LEN (".mcommit"), PROCESSOR_UNKNOWN,
@@ -1255,6 +1257,7 @@ static const noarch_entry cpu_noarch[] =
{ STRING_COMMA_LEN ("noavx512_bf16"), CPU_ANY_AVX512_BF16_FLAGS },
{ STRING_COMMA_LEN ("noavx512_vp2intersect"), CPU_ANY_SHSTK_FLAGS },
{ STRING_COMMA_LEN ("noenqcmd"), CPU_ANY_ENQCMD_FLAGS },
+ { STRING_COMMA_LEN ("noserialize"), CPU_ANY_SERIALIZE_FLAGS },
};
#ifdef I386COFF
diff --git a/gas/doc/c-i386.texi b/gas/doc/c-i386.texi
index 1dd99f9..d42148e 100644
--- a/gas/doc/c-i386.texi
+++ b/gas/doc/c-i386.texi
@@ -187,6 +187,7 @@ accept various extension mnemonics. For example,
@code{movdiri},
@code{movdir64b},
@code{enqcmd},
+@code{serialize},
@code{avx512f},
@code{avx512cd},
@code{avx512er},
@@ -221,6 +222,7 @@ accept various extension mnemonics. For example,
@code{noavx512_vp2intersect},
@code{noavx512_bf16},
@code{noenqcmd},
+@code{noserialize},
@code{vmx},
@code{vmfunc},
@code{smx},
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index f21131e..7961bb1 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -476,6 +476,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]]
run_dump_test "enqcmd"
run_dump_test "enqcmd-intel"
run_list_test "enqcmd-inval"
+ run_dump_test "serialize"
run_dump_test "vp2intersect"
run_dump_test "vp2intersect-intel"
run_list_test "vp2intersect-inval-bcast"
@@ -1052,6 +1053,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t
run_dump_test "x86-64-enqcmd"
run_dump_test "x86-64-enqcmd-intel"
run_list_test "x86-64-enqcmd-inval"
+ run_dump_test "x86-64-serialize"
run_dump_test "x86-64-vp2intersect"
run_dump_test "x86-64-vp2intersect-intel"
run_list_test "x86-64-vp2intersect-inval-bcast"
diff --git a/gas/testsuite/gas/i386/serialize.d b/gas/testsuite/gas/i386/serialize.d
new file mode 100644
index 0000000..ba50158
--- /dev/null
+++ b/gas/testsuite/gas/i386/serialize.d
@@ -0,0 +1,12 @@
+#as:
+#objdump: -dw
+#name: SERIALIZE insns
+#source: serialize.s
+
+.*: +file format .*
+
+Disassembly of section \.text:
+
+0+ <_start>:
+[ ]*[a-f0-9]+: 0f 01 e8 + serialize *
+#pass
diff --git a/gas/testsuite/gas/i386/serialize.s b/gas/testsuite/gas/i386/serialize.s
new file mode 100644
index 0000000..80f079d
--- /dev/null
+++ b/gas/testsuite/gas/i386/serialize.s
@@ -0,0 +1,5 @@
+# Check SERIALIZE instructions.
+
+ .text
+_start:
+ serialize
diff --git a/gas/testsuite/gas/i386/x86-64-serialize.d b/gas/testsuite/gas/i386/x86-64-serialize.d
new file mode 100644
index 0000000..79ac814
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-serialize.d
@@ -0,0 +1,12 @@
+#as:
+#objdump: -dw
+#name: x86_64 SERIALIZE insns
+#source: serialize.s
+
+.*: +file format .*
+
+Disassembly of section \.text:
+
+0+ <_start>:
+[ ]*[a-f0-9]+: 0f 01 e8 + serialize *
+#pass