aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-12-09 08:01:57 -0800
committerH.J. Lu <hjl.tools@gmail.com>2015-12-09 08:01:57 -0800
commit8eab413676a0222a863f45ff606f3db69bb7afc4 (patch)
tree8fffeb4186f33ac88d0538ac9ab3cdc07d62d136 /gas/testsuite
parentfa7cc15f24f9cd8e3cc07c7552c3fad1b756eed8 (diff)
downloadgdb-8eab413676a0222a863f45ff606f3db69bb7afc4.zip
gdb-8eab413676a0222a863f45ff606f3db69bb7afc4.tar.gz
gdb-8eab413676a0222a863f45ff606f3db69bb7afc4.tar.bz2
Implement Intel OSPKE instructions
This patch implements Intel OSPKE instructions documented in Intel64 and IA-32 Architectures Software Developer’s Manual Volume 2, September 2015. gas/testsuite/ * gas/i386/i386.exp: Run ospke and x86-64-ospke. * gas/i386/ospke.d: New file. * gas/i386/ospke.s: Likewise. * gas/i386/x86-64-ospke.d: Likewise. opcodes/ * i386-dis.c (MOD_0F01_REG_5): New. (RM_0F01_REG_5): Likewise. (reg_table): Use MOD_0F01_REG_5. (mod_table): Add MOD_0F01_REG_5. (rm_table): Add RM_0F01_REG_5. * i386-gen.c (cpu_flag_init): Add CPU_OSPKE_FLAGS. (cpu_flags): Add CpuOSPKE. * i386-opc.h (CpuOSPKE): New. (i386_cpu_flags): Add cpuospke. * i386-opc.tbl: Add rdpkru and wrpkru instructions. * i386-init.h: Regenerated. * i386-tbl.h: Likewise.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog7
-rw-r--r--gas/testsuite/gas/i386/i386.exp2
-rw-r--r--gas/testsuite/gas/i386/ospke.d12
-rw-r--r--gas/testsuite/gas/i386/ospke.s6
-rw-r--r--gas/testsuite/gas/i386/x86-64-ospke.d13
5 files changed, 40 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 5978a3f..d0f5dea 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2015-12-09 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gas/i386/i386.exp: Run ospke and x86-64-ospke.
+ * gas/i386/ospke.d: New file.
+ * gas/i386/ospke.s: Likewise.
+ * gas/i386/x86-64-ospke.d: Likewise.
+
2015-12-09 Jan Beulich <jbeulich@suse.com>
* gas/elf/file.d: Allow arbitrary entries at the beginning of
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index 1739ba9..d881cd8 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -343,6 +343,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]]
run_dump_test "disassem"
run_dump_test "mwaitx-bdver4"
run_list_test "mwaitx-reg"
+ run_dump_test "ospke"
# These tests require support for 8 and 16 bit relocs,
# so we only run them for ELF and COFF targets.
@@ -729,6 +730,7 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t
run_dump_test "x86-64-clzero"
run_dump_test "x86-64-mwaitx-bdver4"
run_list_test "x86-64-mwaitx-reg"
+ run_dump_test "x86-64-ospke"
if { ![istarget "*-*-aix*"]
&& ![istarget "*-*-beos*"]
diff --git a/gas/testsuite/gas/i386/ospke.d b/gas/testsuite/gas/i386/ospke.d
new file mode 100644
index 0000000..6e0afb0
--- /dev/null
+++ b/gas/testsuite/gas/i386/ospke.d
@@ -0,0 +1,12 @@
+#name: i386 OSPKE insns
+#objdump: -dw
+
+.*: +file format .*
+
+
+Disassembly of section .text:
+
+0+ <_start>:
+[ ]*[a-f0-9]+: 0f 01 ee rdpkru
+[ ]*[a-f0-9]+: 0f 01 ef wrpkru
+#pass
diff --git a/gas/testsuite/gas/i386/ospke.s b/gas/testsuite/gas/i386/ospke.s
new file mode 100644
index 0000000..76b66e7
--- /dev/null
+++ b/gas/testsuite/gas/i386/ospke.s
@@ -0,0 +1,6 @@
+# Check OSPKE instructions.
+
+ .text
+_start:
+ rdpkru
+ wrpkru
diff --git a/gas/testsuite/gas/i386/x86-64-ospke.d b/gas/testsuite/gas/i386/x86-64-ospke.d
new file mode 100644
index 0000000..88e7ec0
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-ospke.d
@@ -0,0 +1,13 @@
+#source: ospke.s
+#name: x86-64 OSPKE insns
+#objdump: -dw
+
+.*: +file format .*
+
+
+Disassembly of section .text:
+
+0+ <_start>:
+[ ]*[a-f0-9]+: 0f 01 ee rdpkru
+[ ]*[a-f0-9]+: 0f 01 ef wrpkru
+#pass