aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorLili Cui <lili.cui@intel.com>2020-10-14 04:31:54 -0700
committerH.J. Lu <hjl.tools@gmail.com>2020-10-14 04:31:54 -0700
commitf64c42a9fb19409bb45d86d4b78f0465980dfcba (patch)
treebf5f77acf4027b62a0a97e2e317813b49860165e /gas
parent8b65b8953af2d49ae1d2d7fcc5b49c5308febbc1 (diff)
downloadgdb-f64c42a9fb19409bb45d86d4b78f0465980dfcba.zip
gdb-f64c42a9fb19409bb45d86d4b78f0465980dfcba.tar.gz
gdb-f64c42a9fb19409bb45d86d4b78f0465980dfcba.tar.bz2
x86: Support Intel UINTR
gas/ * NEWS: Add Intel UINTR. * config/tc-i386.c (cpu_arch): Add .uintr. (cpu_noarch): Likewise. * doc/c-i386.texi: Document .uintr and nouintr. * testsuite/gas/i386/i386.exp: Run UINTR tests. * testsuite/gas/i386/x86-64-uintr.d: Likewise. * testsuite/gas/i386/x86-64-uintr.s: Likewise. opcodes/ * i386-dis.c (enum): Add PREFIX_MOD_3_0F01_REG_5_RM_4, PREFIX_MOD_3_0F01_REG_5_RM_5, PREFIX_MOD_3_0F01_REG_5_RM_6, PREFIX_MOD_3_0F01_REG_5_RM_7, X86_64_0F01_REG_5_MOD_3_RM_4_PREFIX_1, X86_64_0F01_REG_5_MOD_3_RM_5_PREFIX_1, X86_64_0F01_REG_5_MOD_3_RM_6_PREFIX_1, X86_64_0F01_REG_5_MOD_3_RM_7_PREFIX_1, X86_64_0FC7_REG_6_MOD_3_PREFIX_1. (prefix_table): New instructions (see prefixes above). (rm_table): Likewise * i386-gen.c (cpu_flag_init): Add CPU_UINTR_FLAGS, CPU_ANY_UINTR_FLAGS. (cpu_flags): Add CpuUINTR. * i386-opc.h (enum): Add CpuUINTR. (i386_cpu_flags): Add cpuuintr. * i386-opc.tbl: Add UINTR insns. * i386-init.h: Regenerate. * i386-tbl.h: Likewise.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog10
-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/i386.exp1
-rw-r--r--gas/testsuite/gas/i386/x86-64-uintr.d17
-rw-r--r--gas/testsuite/gas/i386/x86-64-uintr.s10
7 files changed, 46 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index ae54f17..7a55863 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,13 @@
+2020-10-14 Lili Cui <lili.cui@intel.com>
+
+ * NEWS: Add Intel UINTR.
+ * config/tc-i386.c (cpu_arch): Add .uintr.
+ (cpu_noarch): Likewise.
+ * doc/c-i386.texi: Document .uintr and nouintr.
+ * testsuite/gas/i386/i386.exp: Run UINTR tests.
+ * testsuite/gas/i386/x86-64-uintr.d: Likewise.
+ * testsuite/gas/i386/x86-64-uintr.s: Likewise.
+
2020-10-14 H.J. Lu <hongjiu.lu@intel.com>
* config/tc-i386.c (load_insn_p): Check opcodeprefix == 0 for
diff --git a/gas/NEWS b/gas/NEWS
index 1107725..ff757fe 100644
--- a/gas/NEWS
+++ b/gas/NEWS
@@ -1,5 +1,7 @@
-*- text -*-
+* Add support for Intel UINTR instructions.
+
* Support non-absolute segment values for i386 lcall and ljmp.
* When setting the link order attribute of ELF sections, it is now possible to
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 80b96d0..2de7e74 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -1240,6 +1240,8 @@ static const arch_entry cpu_arch[] =
CPU_KL_FLAGS, 0 },
{ STRING_COMMA_LEN (".widekl"), PROCESSOR_UNKNOWN,
CPU_WIDEKL_FLAGS, 0 },
+ { STRING_COMMA_LEN (".uintr"), PROCESSOR_UNKNOWN,
+ CPU_UINTR_FLAGS, 0 },
};
static const noarch_entry cpu_noarch[] =
@@ -1292,6 +1294,7 @@ static const noarch_entry cpu_noarch[] =
{ STRING_COMMA_LEN ("notsxldtrk"), CPU_ANY_TSXLDTRK_FLAGS },
{ STRING_COMMA_LEN ("nokl"), CPU_ANY_KL_FLAGS },
{ STRING_COMMA_LEN ("nowidekl"), CPU_ANY_WIDEKL_FLAGS },
+ { STRING_COMMA_LEN ("nouintr"), CPU_ANY_UINTR_FLAGS },
};
#ifdef I386COFF
diff --git a/gas/doc/c-i386.texi b/gas/doc/c-i386.texi
index 776fed8..5f58b89 100644
--- a/gas/doc/c-i386.texi
+++ b/gas/doc/c-i386.texi
@@ -238,6 +238,7 @@ accept various extension mnemonics. For example,
@code{noamx_bf16},
@code{amx_tile},
@code{noamx_tile},
+@code{nouintr},
@code{vmx},
@code{vmfunc},
@code{smx},
@@ -265,6 +266,7 @@ accept various extension mnemonics. For example,
@code{wbnoinvd},
@code{pconfig},
@code{waitpkg},
+@code{uintr},
@code{cldemote},
@code{rdpru},
@code{mcommit},
@@ -1511,7 +1513,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}
+@item @samp{.kl} @tab @samp{.widekl} @tab @samp{.uintr}
@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/i386.exp b/gas/testsuite/gas/i386/i386.exp
index 8645f30..66366a0 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -1094,6 +1094,7 @@ if [gas_64_check] then {
run_dump_test "x86-64-pconfig-intel"
run_dump_test "x86-64-waitpkg"
run_dump_test "x86-64-waitpkg-intel"
+ run_dump_test "x86-64-uintr"
run_dump_test "x86-64-cldemote"
run_dump_test "x86-64-cldemote-intel"
run_dump_test "x86-64-movdir"
diff --git a/gas/testsuite/gas/i386/x86-64-uintr.d b/gas/testsuite/gas/i386/x86-64-uintr.d
new file mode 100644
index 0000000..2208092
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-uintr.d
@@ -0,0 +1,17 @@
+#as:
+#objdump: -dw
+#name: x86_64 UINTR insns
+#source: x86-64-uintr.s
+
+.*: +file format .*
+
+Disassembly of section \.text:
+
+0+ <_start>:
+ +[a-f0-9]+: f3 0f 01 ec uiret *
+ +[a-f0-9]+: f3 0f 01 ed testui *
+ +[a-f0-9]+: f3 0f 01 ee clui *
+ +[a-f0-9]+: f3 0f 01 ef stui *
+ +[a-f0-9]+: f3 0f c7 f0 senduipi %rax
+ +[a-f0-9]+: f3 41 0f c7 f2 senduipi %r10
+#pass
diff --git a/gas/testsuite/gas/i386/x86-64-uintr.s b/gas/testsuite/gas/i386/x86-64-uintr.s
new file mode 100644
index 0000000..0cbda3e
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-uintr.s
@@ -0,0 +1,10 @@
+# Check 64bit UINTR instructions.
+
+ .text
+_start:
+ uiret
+ testui
+ clui
+ stui
+ senduipi %rax
+ senduipi %r10