aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2005-12-14 08:57:06 +0000
committerJan Beulich <jbeulich@novell.com>2005-12-14 08:57:06 +0000
commitb1905489985db0a9eb1e8438e6832f08656248bd (patch)
tree71cc615caf9801cab87cbf196e4739b388ea5e4e /gas/testsuite
parenteda87aba05086a3cef1cafe3ca76c2139727a47e (diff)
downloadgdb-b1905489985db0a9eb1e8438e6832f08656248bd.zip
gdb-b1905489985db0a9eb1e8438e6832f08656248bd.tar.gz
gdb-b1905489985db0a9eb1e8438e6832f08656248bd.tar.bz2
gas/
2005-12-14 Jan Beulich <jbeulich@novell.com> * config/tc-i386.c (add_prefix): More fine-grained handling of REX prefixes. Or new prefix value into i.prefix instead of assigning. gas/testsuite/ 2005-12-14 Jan Beulich <jbeulich@novell.com> * gas/i386/rex.[sd]: New. * gas/i386/i386.exp: Run new test.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog5
-rw-r--r--gas/testsuite/gas/i386/i386.exp15
-rw-r--r--gas/testsuite/gas/i386/rex.d17
-rw-r--r--gas/testsuite/gas/i386/rex.s11
4 files changed, 48 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index a5d1124..a7e9c9f 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2005-12-14 Jan Beulich <jbeulich@novell.com>
+
+ * gas/i386/rex.[sd]: New.
+ * gas/i386/i386.exp: Run new test.
+
2005-12-12 Nathan Sidwell <nathan@codesourcery.com>
* gas/mt: Renamed from ms1 dir. Update file names as needed.
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index 718514f..6638d4b 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -133,6 +133,21 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t
run_dump_test "immed64"
run_dump_test "x86-64-prescott"
+ if { ![istarget "*-*-aix*"]
+ && ![istarget "*-*-beos*"]
+ && ![istarget "*-*-*bsd*"]
+ && ![istarget "*-*-chaos*"]
+ && ![istarget "*-*-kaos*"]
+ && ![istarget "*-*-lynx*"]
+ && ![istarget "*-*-moss*"]
+ && ![istarget "*-*-nto-qnx*"]
+ && ![istarget "*-*-rtems*"]
+ && ![istarget "*-*-sco*"]
+ && ![istarget "*-*-solaris*"]
+ && ![istarget "*-*-sysv*"] } then {
+ run_dump_test "rex"
+ }
+
# For ELF targets verify that @unwind works.
if { ([istarget "*-*-elf*"] || [istarget "*-*-linux*"]
|| [istarget "*-*-solaris2.*"])
diff --git a/gas/testsuite/gas/i386/rex.d b/gas/testsuite/gas/i386/rex.d
new file mode 100644
index 0000000..dab6b12
--- /dev/null
+++ b/gas/testsuite/gas/i386/rex.d
@@ -0,0 +1,17 @@
+#objdump: -dw
+#name: x86-64 manual rex prefix use
+
+.*: +file format elf64-x86-64
+
+Disassembly of section .text:
+
+0+ <_start>:
+[ ]*[0-9a-f]+:[ ]+40 0f ae 00[ ]+rex fxsavel?[ ]+\(%rax\)
+[ ]*[0-9a-f]+:[ ]+48 0f ae 00[ ]+(rex64 )?fxsaveq?[ ]+\(%rax\)
+[ ]*[0-9a-f]+:[ ]+41 0f ae 00[ ]+fxsavel?[ ]+\(%r8\)
+[ ]*[0-9a-f]+:[ ]+49 0f ae 00[ ]+(rex64Z? )?fxsaveq?[ ]+\(%r8\)
+[ ]*[0-9a-f]+:[ ]+42 0f ae 04 05 00 00 00 00[ ]+fxsavel?[ ]+(0x0)?\(,%r8(,1)?\)
+[ ]*[0-9a-f]+:[ ]+4a 0f ae 04 05 00 00 00 00[ ]+(rex64Y? )?fxsaveq?[ ]+(0x0)?\(,%r8(,1)?\)
+[ ]*[0-9a-f]+:[ ]+43 0f ae 04 00[ ]+fxsavel?[ ]+\(%r8,%r8(,1)?\)
+[ ]*[0-9a-f]+:[ ]+4b 0f ae 04 00[ ]+(rex64(YZ)? )?fxsaveq?[ ]+\(%r8,%r8(,1)?\)
+#pass
diff --git a/gas/testsuite/gas/i386/rex.s b/gas/testsuite/gas/i386/rex.s
new file mode 100644
index 0000000..a142312
--- /dev/null
+++ b/gas/testsuite/gas/i386/rex.s
@@ -0,0 +1,11 @@
+ .text
+
+_start:
+ rex/fxsave (%rax)
+ rex64/fxsave (%rax)
+ rex/fxsave (%r8)
+ rex64/fxsave (%r8)
+ rex/fxsave (,%r8)
+ rex64/fxsave (,%r8)
+ rex/fxsave (%r8,%r8)
+ rex64/fxsave (%r8,%r8)