aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2008-02-12 00:04:45 +0000
committerH.J. Lu <hjl.tools@gmail.com>2008-02-12 00:04:45 +0000
commit475a2301db23da20a59a59814f8b1a9eebce7855 (patch)
tree5a6d714e4f60447a7317b10e356ba4fece733b78 /gas
parent86ed6051f72836e8bac640770bb47b04571df758 (diff)
downloadgdb-475a2301db23da20a59a59814f8b1a9eebce7855.zip
gdb-475a2301db23da20a59a59814f8b1a9eebce7855.tar.gz
gdb-475a2301db23da20a59a59814f8b1a9eebce7855.tar.bz2
gas/testsuite/
2002-02-11 H.J. Lu <hongjiu.lu@intel.com> * gas/i386/i386.exp: Run xsave, xsave-intel, x86-64-xsave and x86-64-xsave-intel. * gas/i386/x86-64-xsave-intel.d: New file. * gas/i386/x86-64-xsave.d: Likewise. * gas/i386/x86-64-xsave.s: Likewise. * gas/i386/xsave-intel.d: Likewise. * gas/i386/xsave.d: Likewise. * gas/i386/xsave.s: Likewise. opcodes/ 2008-02-11 H.J. Lu <hongjiu.lu@intel.com> * i386-gen.c (cpu_flags): Add CpuXsave. * i386-opc.h (CpuXsave): New. (Cpu64): Updated. (i386_cpu_flags): Add cpuxsave. * i386-dis.c (MOD_0FAE_REG_4): New. (RM_0F01_REG_2): Likewise. (MOD_0FAE_REG_5): Updated. (RM_0F01_REG_3): Likewise. (reg_table): Use MOD_0FAE_REG_4. (mod_table): Use RM_0F01_REG_2. Add MOD_0FAE_REG_4. Updated for xrstor. (rm_table): Add RM_0F01_REG_2. * i386-opc.tbl: Add xsave, xrstor, xgetbv and xsetbv. * i386-init.h: Regenerated. * i386-tbl.h: Likewise.
Diffstat (limited to 'gas')
-rw-r--r--gas/testsuite/ChangeLog12
-rw-r--r--gas/testsuite/gas/i386/i386.exp4
-rw-r--r--gas/testsuite/gas/i386/x86-64-xsave-intel.d17
-rw-r--r--gas/testsuite/gas/i386/x86-64-xsave.d15
-rw-r--r--gas/testsuite/gas/i386/x86-64-xsave.s11
-rw-r--r--gas/testsuite/gas/i386/xsave-intel.d17
-rw-r--r--gas/testsuite/gas/i386/xsave.d15
-rw-r--r--gas/testsuite/gas/i386/xsave.s11
8 files changed, 102 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 2e44122..a24e8bc 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,15 @@
+2002-02-11 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gas/i386/i386.exp: Run xsave, xsave-intel, x86-64-xsave
+ and x86-64-xsave-intel.
+
+ * gas/i386/x86-64-xsave-intel.d: New file.
+ * gas/i386/x86-64-xsave.d: Likewise.
+ * gas/i386/x86-64-xsave.s: Likewise.
+ * gas/i386/xsave-intel.d: Likewise.
+ * gas/i386/xsave.d: Likewise.
+ * gas/i386/xsave.s: Likewise.
+
2008-02-05 Adam Nemet <anemet@caviumnetworks.com>
* gas/mips/mips.exp: Invoke the tests smartmips, mips32-dsp,
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index 14583dd..8ccb567 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -114,6 +114,8 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_32_check]]
run_list_test "arch-10-4" "-march=i686+sse4+vmx+smx -I${srcdir}/$subdir -al"
run_dump_test "arch-11"
run_dump_test "arch-12"
+ run_dump_test "xsave"
+ run_dump_test "xsave-intel"
# These tests require support for 8 and 16 bit relocs,
# so we only run them for ELF and COFF targets.
@@ -226,6 +228,8 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t
run_dump_test "rexw"
run_dump_test "x86-64-arch-1"
run_dump_test "x86-64-arch-10"
+ run_dump_test "x86-64-xsave"
+ run_dump_test "x86-64-xsave-intel"
if { ![istarget "*-*-aix*"]
&& ![istarget "*-*-beos*"]
diff --git a/gas/testsuite/gas/i386/x86-64-xsave-intel.d b/gas/testsuite/gas/i386/x86-64-xsave-intel.d
new file mode 100644
index 0000000..4659a2e
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-xsave-intel.d
@@ -0,0 +1,17 @@
+#source: x86-64-xsave.s
+#as: -J
+#objdump: -dw -Mintel
+#name: x86-64 xsave (Intel mode)
+
+.*: +file format .*
+
+Disassembly of section .text:
+
+0+ <_start>:
+[ ]*[a-f0-9]+: 41 0f ae 29 xrstor \[r9\]
+[ ]*[a-f0-9]+: 41 0f ae 21 xsave \[r9\]
+[ ]*[a-f0-9]+: 0f 01 d0 xgetbv
+[ ]*[a-f0-9]+: 0f 01 d1 xsetbv
+[ ]*[a-f0-9]+: 0f ae 29 xrstor \[rcx\]
+[ ]*[a-f0-9]+: 0f ae 21 xsave \[rcx\]
+#pass
diff --git a/gas/testsuite/gas/i386/x86-64-xsave.d b/gas/testsuite/gas/i386/x86-64-xsave.d
new file mode 100644
index 0000000..88b58f1
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-xsave.d
@@ -0,0 +1,15 @@
+#objdump: -dw
+#name: x86-64 xsave prefix
+
+.*: +file format .*
+
+Disassembly of section .text:
+
+0+ <_start>:
+[ ]*[a-f0-9]+: 41 0f ae 29 xrstor \(%r9\)
+[ ]*[a-f0-9]+: 41 0f ae 21 xsave \(%r9\)
+[ ]*[a-f0-9]+: 0f 01 d0 xgetbv
+[ ]*[a-f0-9]+: 0f 01 d1 xsetbv
+[ ]*[a-f0-9]+: 0f ae 29 xrstor \(%rcx\)
+[ ]*[a-f0-9]+: 0f ae 21 xsave \(%rcx\)
+#pass
diff --git a/gas/testsuite/gas/i386/x86-64-xsave.s b/gas/testsuite/gas/i386/x86-64-xsave.s
new file mode 100644
index 0000000..076706f
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-xsave.s
@@ -0,0 +1,11 @@
+# Check 64bit xsave/xrstor
+ .text
+_start:
+ xrstor (%r9)
+ xsave (%r9)
+ xgetbv
+ xsetbv
+
+ .intel_syntax noprefix
+ xrstor [rcx]
+ xsave [rcx]
diff --git a/gas/testsuite/gas/i386/xsave-intel.d b/gas/testsuite/gas/i386/xsave-intel.d
new file mode 100644
index 0000000..246d0cf
--- /dev/null
+++ b/gas/testsuite/gas/i386/xsave-intel.d
@@ -0,0 +1,17 @@
+#source: xsave.s
+#as: -J
+#objdump: -dw -Mintel
+#name: i386 xsave (Intel mode)
+
+.*: +file format .*
+
+Disassembly of section .text:
+
+0+ <_start>:
+[ ]*[a-f0-9]+: 0f ae 2b xrstor \[ebx\]
+[ ]*[a-f0-9]+: 0f ae 23 xsave \[ebx\]
+[ ]*[a-f0-9]+: 0f 01 d0 xgetbv
+[ ]*[a-f0-9]+: 0f 01 d1 xsetbv
+[ ]*[a-f0-9]+: 0f ae 29 xrstor \[ecx\]
+[ ]*[a-f0-9]+: 0f ae 21 xsave \[ecx\]
+#pass
diff --git a/gas/testsuite/gas/i386/xsave.d b/gas/testsuite/gas/i386/xsave.d
new file mode 100644
index 0000000..4aedff5
--- /dev/null
+++ b/gas/testsuite/gas/i386/xsave.d
@@ -0,0 +1,15 @@
+#objdump: -dw
+#name: i386 xsave
+
+.*: file format .*
+
+Disassembly of section .text:
+
+0+ <_start>:
+[ ]*[a-f0-9]+: 0f ae 2b xrstor \(%ebx\)
+[ ]*[a-f0-9]+: 0f ae 23 xsave \(%ebx\)
+[ ]*[a-f0-9]+: 0f 01 d0 xgetbv
+[ ]*[a-f0-9]+: 0f 01 d1 xsetbv
+[ ]*[a-f0-9]+: 0f ae 29 xrstor \(%ecx\)
+[ ]*[a-f0-9]+: 0f ae 21 xsave \(%ecx\)
+#pass
diff --git a/gas/testsuite/gas/i386/xsave.s b/gas/testsuite/gas/i386/xsave.s
new file mode 100644
index 0000000..5ed3ca5
--- /dev/null
+++ b/gas/testsuite/gas/i386/xsave.s
@@ -0,0 +1,11 @@
+# Check xsave/xrstor
+ .text
+_start:
+ xrstor (%ebx)
+ xsave (%ebx)
+ xgetbv
+ xsetbv
+
+ .intel_syntax noprefix
+ xrstor [ecx]
+ xsave [ecx]