aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
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