aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorLili Cui <lili.cui@intel.com>2020-10-14 04:52:11 -0700
committerH.J. Lu <hjl.tools@gmail.com>2020-10-14 04:53:59 -0700
commitc1fa250ae1604d3337cf63279503a737c9377574 (patch)
treef47d5dab92a4856a64e80b87f35a20d153e82fac /gas
parentf64c42a9fb19409bb45d86d4b78f0465980dfcba (diff)
downloadgdb-c1fa250ae1604d3337cf63279503a737c9377574.zip
gdb-c1fa250ae1604d3337cf63279503a737c9377574.tar.gz
gdb-c1fa250ae1604d3337cf63279503a737c9377574.tar.bz2
x86: Add support for Intel HRESET instruction
gas/ * NEWS: Add Intel HRESET. * config/tc-i386.c (cpu_arch): Add .hreset. (cpu_noarch): Likewise. * doc/c-i386.texi: Document .hreset, nohreset. * testsuite/gas/i386/i386.exp: Run HRESET tests. * testsuite/gas/i386/hreset.d: New file. * testsuite/gas/i386/x86-64-hreset.d: Likewise. * testsuite/gas/i386/hreset.s: Likewise. opcodes/ * i386-dis.c (PREFIX_0F3A0F): New. (MOD_0F3A0F_PREFIX_1): Likewise. (REG_0F3A0F_PREFIX_1_MOD_3): Likewise. (RM_0F3A0F_P_1_MOD_3_REG_0): Likewise. (prefix_table): Add PREFIX_0F3A0F. (mod_table): Add MOD_0F3A0F_PREFIX_1. (reg_table): Add REG_0F3A0F_PREFIX_1_MOD_3. (rm_table): Add RM_0F3A0F_P_1_MOD_3_REG_0. * i386-gen.c (cpu_flag_init): Add HRESET_FLAGS, CPU_ANY_HRESET_FLAGS. (cpu_flags): Add CpuHRESET. (output_i386_opcode): Allow 4 byte base_opcode. * i386-opc.h (enum): Add CpuHRESET. (i386_cpu_flags): Add cpuhreset. * i386-opc.tbl: Add Intel HRESET instruction. * i386-init.h: Regenerate. * i386-tbl.h: Likewise.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog11
-rw-r--r--gas/NEWS2
-rw-r--r--gas/config/tc-i386.c3
-rw-r--r--gas/doc/c-i386.texi4
-rw-r--r--gas/testsuite/gas/i386/hreset.d12
-rw-r--r--gas/testsuite/gas/i386/hreset.s5
-rw-r--r--gas/testsuite/gas/i386/i386.exp2
-rw-r--r--gas/testsuite/gas/i386/x86-64-hreset.d12
8 files changed, 50 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 7a55863..ade0076 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,16 @@
2020-10-14 Lili Cui <lili.cui@intel.com>
+ * NEWS: Add Intel HRESET.
+ * config/tc-i386.c (cpu_arch): Add .hreset.
+ (cpu_noarch): Likewise.
+ * doc/c-i386.texi: Document .hreset, nohreset.
+ * testsuite/gas/i386/i386.exp: Run HRESET tests.
+ * testsuite/gas/i386/hreset.d: New file.
+ * testsuite/gas/i386/x86-64-hreset.d: Likewise.
+ * testsuite/gas/i386/hreset.s: Likewise.
+
+2020-10-14 Lili Cui <lili.cui@intel.com>
+
* NEWS: Add Intel UINTR.
* config/tc-i386.c (cpu_arch): Add .uintr.
(cpu_noarch): Likewise.
diff --git a/gas/NEWS b/gas/NEWS
index ff757fe..3914775 100644
--- a/gas/NEWS
+++ b/gas/NEWS
@@ -1,5 +1,7 @@
-*- text -*-
+* Add support for Intel HRESET instruction.
+
* Add support for Intel UINTR instructions.
* Support non-absolute segment values for i386 lcall and ljmp.
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 2de7e74..6df250a 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -1242,6 +1242,8 @@ static const arch_entry cpu_arch[] =
CPU_WIDEKL_FLAGS, 0 },
{ STRING_COMMA_LEN (".uintr"), PROCESSOR_UNKNOWN,
CPU_UINTR_FLAGS, 0 },
+ { STRING_COMMA_LEN (".hreset"), PROCESSOR_UNKNOWN,
+ CPU_HRESET_FLAGS, 0 },
};
static const noarch_entry cpu_noarch[] =
@@ -1295,6 +1297,7 @@ static const noarch_entry cpu_noarch[] =
{ STRING_COMMA_LEN ("nokl"), CPU_ANY_KL_FLAGS },
{ STRING_COMMA_LEN ("nowidekl"), CPU_ANY_WIDEKL_FLAGS },
{ STRING_COMMA_LEN ("nouintr"), CPU_ANY_UINTR_FLAGS },
+ { STRING_COMMA_LEN ("nohreset"), CPU_ANY_HRESET_FLAGS },
};
#ifdef I386COFF
diff --git a/gas/doc/c-i386.texi b/gas/doc/c-i386.texi
index 5f58b89..6fd2f42 100644
--- a/gas/doc/c-i386.texi
+++ b/gas/doc/c-i386.texi
@@ -193,6 +193,7 @@ accept various extension mnemonics. For example,
@code{nokl},
@code{widekl},
@code{nowidekl},
+@code{hreset},
@code{avx512f},
@code{avx512cd},
@code{avx512er},
@@ -239,6 +240,7 @@ accept various extension mnemonics. For example,
@code{amx_tile},
@code{noamx_tile},
@code{nouintr},
+@code{nohreset},
@code{vmx},
@code{vmfunc},
@code{smx},
@@ -1513,7 +1515,7 @@ supported on the CPU specified. The choices for @var{cpu_type} are:
@item @samp{.shstk} @tab @samp{.gfni} @tab @samp{.vaes} @tab @samp{.vpclmulqdq}
@item @samp{.movdiri} @tab @samp{.movdir64b} @tab @samp{.enqcmd} @tab @samp{.tsxldtrk}
@item @samp{.amx_int8} @tab @samp{.amx_bf16} @tab @samp{.amx_tile}
-@item @samp{.kl} @tab @samp{.widekl} @tab @samp{.uintr}
+@item @samp{.kl} @tab @samp{.widekl} @tab @samp{.uintr} @tab @samp{.hreset}
@item @samp{.3dnow} @tab @samp{.3dnowa} @tab @samp{.sse4a} @tab @samp{.sse5}
@item @samp{.syscall} @tab @samp{.rdtscp} @tab @samp{.svme}
@item @samp{.lwp} @tab @samp{.fma4} @tab @samp{.xop} @tab @samp{.cx16}
diff --git a/gas/testsuite/gas/i386/hreset.d b/gas/testsuite/gas/i386/hreset.d
new file mode 100644
index 0000000..0254865
--- /dev/null
+++ b/gas/testsuite/gas/i386/hreset.d
@@ -0,0 +1,12 @@
+#as:
+#objdump: -dw
+#name: HRESET insns
+#source: hreset.s
+
+.*: +file format .*
+
+Disassembly of section \.text:
+
+0+ <_start>:
+[ ]*[a-f0-9]+:[ ]*f3 0f 3a f0 c0 08[ ]*hreset \$0x8
+#pass
diff --git a/gas/testsuite/gas/i386/hreset.s b/gas/testsuite/gas/i386/hreset.s
new file mode 100644
index 0000000..ff0887c
--- /dev/null
+++ b/gas/testsuite/gas/i386/hreset.s
@@ -0,0 +1,5 @@
+# Check HRESET instructions.
+
+ .text
+_start:
+ hreset $0x8
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index 66366a0..a761767 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -493,6 +493,7 @@ if [gas_32_check] then {
run_dump_test "serialize"
run_dump_test "tdx"
run_dump_test "tsxldtrk"
+ run_dump_test "hreset"
run_dump_test "vp2intersect"
run_dump_test "vp2intersect-intel"
run_list_test "vp2intersect-inval-bcast"
@@ -1106,6 +1107,7 @@ if [gas_64_check] then {
run_dump_test "x86-64-serialize"
run_dump_test "x86-64-tdx"
run_dump_test "x86-64-tsxldtrk"
+ run_dump_test "x86-64-hreset"
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/x86-64-hreset.d b/gas/testsuite/gas/i386/x86-64-hreset.d
new file mode 100644
index 0000000..3f0b0b8
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-hreset.d
@@ -0,0 +1,12 @@
+#as:
+#objdump: -dw
+#name: x86_64 HRESET insns
+#source: hreset.s
+
+.*: +file format .*
+
+Disassembly of section \.text:
+
+0+ <_start>:
+[ ]*[a-f0-9]+:[ ]*f3 0f 3a f0 c0 08[ ]*hreset \$0x8
+#pass