aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2009-12-04 07:51:41 +0000
committerH.J. Lu <hjl.tools@gmail.com>2009-12-04 07:51:41 +0000
commiteacc9c891d71cfef7f5c1f152291daeab785b3d4 (patch)
treeb2d8fb26798447501904e39f33f7ac9c0dd081e5 /gas
parent90f5d9d96125bc43fc8c332ed9450d9e8bf4f5b0 (diff)
downloadgdb-eacc9c891d71cfef7f5c1f152291daeab785b3d4.zip
gdb-eacc9c891d71cfef7f5c1f152291daeab785b3d4.tar.gz
gdb-eacc9c891d71cfef7f5c1f152291daeab785b3d4.tar.bz2
Support fxsave64 and fxrstor64.
gas/testsuite/ 2009-12-03 H.J. Lu <hongjiu.lu@intel.com> * gas/i386/i386.exp: Run x86-64-fxsave and x86-64-fxsave-intel. * gas/i386/rex.d: Updated for fxsave64. * gas/i386/x86-64-fxsave-intel.d: New. * gas/i386/x86-64-fxsave.d: Likewise. * gas/i386/x86-64-fxsave.s: Likewise. opcodes/ 2009-12-03 H.J. Lu <hongjiu.lu@intel.com> * i386-dis.c (FXSAVE_Fixup): New. (FXSAVE): Likewise. (mod_table): Use FXSAVE on fxsave and fxrstor. * i386-opc.tbl: Add fxsave64 and fxrstor64. * i386-tbl.h: Regenerated.
Diffstat (limited to 'gas')
-rw-r--r--gas/testsuite/ChangeLog10
-rw-r--r--gas/testsuite/gas/i386/i386.exp2
-rw-r--r--gas/testsuite/gas/i386/rex.d8
-rw-r--r--gas/testsuite/gas/i386/x86-64-fxsave-intel.d49
-rw-r--r--gas/testsuite/gas/i386/x86-64-fxsave.d48
-rw-r--r--gas/testsuite/gas/i386/x86-64-fxsave.s44
6 files changed, 157 insertions, 4 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index e045c07..449a183 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,13 @@
+2009-12-03 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gas/i386/i386.exp: Run x86-64-fxsave and x86-64-fxsave-intel.
+
+ * gas/i386/rex.d: Updated for fxsave64.
+
+ * gas/i386/x86-64-fxsave-intel.d: New.
+ * gas/i386/x86-64-fxsave.d: Likewise.
+ * gas/i386/x86-64-fxsave.s: Likewise.
+
2009-12-02 Nick Clifton <nickc@redhat.com>
Richard Earnshaw <rearnsha@arm.com>
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index 0e6d10b..f4f8a5d 100644
--- a/gas/testsuite/gas/i386/i386.exp
+++ b/gas/testsuite/gas/i386/i386.exp
@@ -304,6 +304,8 @@ if [expr ([istarget "i*86-*-*"] || [istarget "x86_64-*-*"]) && [gas_64_check]] t
run_dump_test "x86-64-opcode-inval-intel"
}
run_dump_test "rexw"
+ run_dump_test "x86-64-fxsave"
+ run_dump_test "x86-64-fxsave-intel"
run_dump_test "x86-64-arch-1"
run_dump_test "x86-64-arch-2"
run_dump_test "x86-64-xsave"
diff --git a/gas/testsuite/gas/i386/rex.d b/gas/testsuite/gas/i386/rex.d
index 97b7854..3548ff2 100644
--- a/gas/testsuite/gas/i386/rex.d
+++ b/gas/testsuite/gas/i386/rex.d
@@ -7,13 +7,13 @@ Disassembly of section .text:
0+ <_start>:
[ ]*[0-9a-f]+:[ ]+40 0f ae 00[ ]+rex fxsave[ ]+\(%rax\)
-[ ]*[0-9a-f]+:[ ]+48 0f ae 00[ ]+rex.W fxsave[ ]+\(%rax\)
+[ ]*[0-9a-f]+:[ ]+48 0f ae 00[ ]+fxsave64[ ]+\(%rax\)
[ ]*[0-9a-f]+:[ ]+41 0f ae 00[ ]+fxsave[ ]+\(%r8\)
-[ ]*[0-9a-f]+:[ ]+49 0f ae 00[ ]+rex.WB? fxsave[ ]+\(%r8\)
+[ ]*[0-9a-f]+:[ ]+49 0f ae 00[ ]+fxsave64[ ]+\(%r8\)
[ ]*[0-9a-f]+:[ ]+42 0f ae 04 05 00 00 00 00[ ]+fxsave[ ]+(0x0)?\(,%r8(,1)?\)
-[ ]*[0-9a-f]+:[ ]+4a 0f ae 04 05 00 00 00 00[ ]+rex.WX? fxsave[ ]+(0x0)?\(,%r8(,1)?\)
+[ ]*[0-9a-f]+:[ ]+4a 0f ae 04 05 00 00 00 00[ ]+fxsave64[ ]+(0x0)?\(,%r8(,1)?\)
[ ]*[0-9a-f]+:[ ]+43 0f ae 04 00[ ]+fxsave[ ]+\(%r8,%r8(,1)?\)
-[ ]*[0-9a-f]+:[ ]+4b 0f ae 04 00[ ]+rex.W(XB)? fxsave[ ]+\(%r8,%r8(,1)?\)
+[ ]*[0-9a-f]+:[ ]+4b 0f ae 04 00[ ]+fxsave64[ ]+\(%r8,%r8(,1)?\)
[ ]*[0-9a-f]+:[ ]+40 c5 f9 28 00[ ]+rex vmovapd \(%rax\),%xmm0
[ ]*[0-9a-f]+:[ ]+40[ ]+rex
[ ]*[0-9a-f]+:[ ]+41[ ]+rex.B
diff --git a/gas/testsuite/gas/i386/x86-64-fxsave-intel.d b/gas/testsuite/gas/i386/x86-64-fxsave-intel.d
new file mode 100644
index 0000000..6af38d1
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-fxsave-intel.d
@@ -0,0 +1,49 @@
+#objdump: -dwMintel
+#name: x86-64 fxsave/fxrstor insns (Intel disassembly)
+#source: x86-64-fxsave.s
+
+.*: +file format .*
+
+
+Disassembly of section .text:
+
+0+ <foo>:
+[ ]*[a-f0-9]+: 0f ae 00 fxsave \[rax\]
+[ ]*[a-f0-9]+: 41 0f ae 00 fxsave \[r8\]
+[ ]*[a-f0-9]+: 41 0f ae 04 00 fxsave \[r8\+rax\*1\]
+[ ]*[a-f0-9]+: 42 0f ae 04 00 fxsave \[rax\+r8\*1\]
+[ ]*[a-f0-9]+: 43 0f ae 04 38 fxsave \[r8\+r15\*1\]
+[ ]*[a-f0-9]+: 48 0f ae 00 fxsave64 \[rax\]
+[ ]*[a-f0-9]+: 49 0f ae 00 fxsave64 \[r8\]
+[ ]*[a-f0-9]+: 49 0f ae 04 00 fxsave64 \[r8\+rax\*1\]
+[ ]*[a-f0-9]+: 4a 0f ae 04 00 fxsave64 \[rax\+r8\*1\]
+[ ]*[a-f0-9]+: 0f ae 08 fxrstor \[rax\]
+[ ]*[a-f0-9]+: 41 0f ae 08 fxrstor \[r8\]
+[ ]*[a-f0-9]+: 41 0f ae 0c 00 fxrstor \[r8\+rax\*1\]
+[ ]*[a-f0-9]+: 42 0f ae 0c 00 fxrstor \[rax\+r8\*1\]
+[ ]*[a-f0-9]+: 43 0f ae 0c 38 fxrstor \[r8\+r15\*1\]
+[ ]*[a-f0-9]+: 48 0f ae 08 fxrstor64 \[rax\]
+[ ]*[a-f0-9]+: 49 0f ae 08 fxrstor64 \[r8\]
+[ ]*[a-f0-9]+: 49 0f ae 0c 00 fxrstor64 \[r8\+rax\*1\]
+[ ]*[a-f0-9]+: 4a 0f ae 0c 00 fxrstor64 \[rax\+r8\*1\]
+[ ]*[a-f0-9]+: 4b 0f ae 0c 38 fxrstor64 \[r8\+r15\*1\]
+[ ]*[a-f0-9]+: 0f ae 00 fxsave \[rax\]
+[ ]*[a-f0-9]+: 41 0f ae 00 fxsave \[r8\]
+[ ]*[a-f0-9]+: 41 0f ae 04 00 fxsave \[r8\+rax\*1\]
+[ ]*[a-f0-9]+: 42 0f ae 04 00 fxsave \[rax\+r8\*1\]
+[ ]*[a-f0-9]+: 43 0f ae 04 38 fxsave \[r8\+r15\*1\]
+[ ]*[a-f0-9]+: 48 0f ae 00 fxsave64 \[rax\]
+[ ]*[a-f0-9]+: 49 0f ae 00 fxsave64 \[r8\]
+[ ]*[a-f0-9]+: 49 0f ae 04 00 fxsave64 \[r8\+rax\*1\]
+[ ]*[a-f0-9]+: 4a 0f ae 04 00 fxsave64 \[rax\+r8\*1\]
+[ ]*[a-f0-9]+: 0f ae 08 fxrstor \[rax\]
+[ ]*[a-f0-9]+: 41 0f ae 08 fxrstor \[r8\]
+[ ]*[a-f0-9]+: 41 0f ae 0c 00 fxrstor \[r8\+rax\*1\]
+[ ]*[a-f0-9]+: 42 0f ae 0c 00 fxrstor \[rax\+r8\*1\]
+[ ]*[a-f0-9]+: 43 0f ae 0c 38 fxrstor \[r8\+r15\*1\]
+[ ]*[a-f0-9]+: 48 0f ae 08 fxrstor64 \[rax\]
+[ ]*[a-f0-9]+: 49 0f ae 08 fxrstor64 \[r8\]
+[ ]*[a-f0-9]+: 49 0f ae 0c 00 fxrstor64 \[r8\+rax\*1\]
+[ ]*[a-f0-9]+: 4a 0f ae 0c 00 fxrstor64 \[rax\+r8\*1\]
+[ ]*[a-f0-9]+: 4b 0f ae 0c 38 fxrstor64 \[r8\+r15\*1\]
+#pass
diff --git a/gas/testsuite/gas/i386/x86-64-fxsave.d b/gas/testsuite/gas/i386/x86-64-fxsave.d
new file mode 100644
index 0000000..5fd9d84
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-fxsave.d
@@ -0,0 +1,48 @@
+#objdump: -dw
+#name: x86-64 fxsave/fxrstor insns
+
+.*: +file format .*
+
+
+Disassembly of section .text:
+
+0+ <foo>:
+[ ]*[a-f0-9]+: 0f ae 00 fxsave \(%rax\)
+[ ]*[a-f0-9]+: 41 0f ae 00 fxsave \(%r8\)
+[ ]*[a-f0-9]+: 41 0f ae 04 00 fxsave \(%r8,%rax,1\)
+[ ]*[a-f0-9]+: 42 0f ae 04 00 fxsave \(%rax,%r8,1\)
+[ ]*[a-f0-9]+: 43 0f ae 04 38 fxsave \(%r8,%r15,1\)
+[ ]*[a-f0-9]+: 48 0f ae 00 fxsave64 \(%rax\)
+[ ]*[a-f0-9]+: 49 0f ae 00 fxsave64 \(%r8\)
+[ ]*[a-f0-9]+: 49 0f ae 04 00 fxsave64 \(%r8,%rax,1\)
+[ ]*[a-f0-9]+: 4a 0f ae 04 00 fxsave64 \(%rax,%r8,1\)
+[ ]*[a-f0-9]+: 0f ae 08 fxrstor \(%rax\)
+[ ]*[a-f0-9]+: 41 0f ae 08 fxrstor \(%r8\)
+[ ]*[a-f0-9]+: 41 0f ae 0c 00 fxrstor \(%r8,%rax,1\)
+[ ]*[a-f0-9]+: 42 0f ae 0c 00 fxrstor \(%rax,%r8,1\)
+[ ]*[a-f0-9]+: 43 0f ae 0c 38 fxrstor \(%r8,%r15,1\)
+[ ]*[a-f0-9]+: 48 0f ae 08 fxrstor64 \(%rax\)
+[ ]*[a-f0-9]+: 49 0f ae 08 fxrstor64 \(%r8\)
+[ ]*[a-f0-9]+: 49 0f ae 0c 00 fxrstor64 \(%r8,%rax,1\)
+[ ]*[a-f0-9]+: 4a 0f ae 0c 00 fxrstor64 \(%rax,%r8,1\)
+[ ]*[a-f0-9]+: 4b 0f ae 0c 38 fxrstor64 \(%r8,%r15,1\)
+[ ]*[a-f0-9]+: 0f ae 00 fxsave \(%rax\)
+[ ]*[a-f0-9]+: 41 0f ae 00 fxsave \(%r8\)
+[ ]*[a-f0-9]+: 41 0f ae 04 00 fxsave \(%r8,%rax,1\)
+[ ]*[a-f0-9]+: 42 0f ae 04 00 fxsave \(%rax,%r8,1\)
+[ ]*[a-f0-9]+: 43 0f ae 04 38 fxsave \(%r8,%r15,1\)
+[ ]*[a-f0-9]+: 48 0f ae 00 fxsave64 \(%rax\)
+[ ]*[a-f0-9]+: 49 0f ae 00 fxsave64 \(%r8\)
+[ ]*[a-f0-9]+: 49 0f ae 04 00 fxsave64 \(%r8,%rax,1\)
+[ ]*[a-f0-9]+: 4a 0f ae 04 00 fxsave64 \(%rax,%r8,1\)
+[ ]*[a-f0-9]+: 0f ae 08 fxrstor \(%rax\)
+[ ]*[a-f0-9]+: 41 0f ae 08 fxrstor \(%r8\)
+[ ]*[a-f0-9]+: 41 0f ae 0c 00 fxrstor \(%r8,%rax,1\)
+[ ]*[a-f0-9]+: 42 0f ae 0c 00 fxrstor \(%rax,%r8,1\)
+[ ]*[a-f0-9]+: 43 0f ae 0c 38 fxrstor \(%r8,%r15,1\)
+[ ]*[a-f0-9]+: 48 0f ae 08 fxrstor64 \(%rax\)
+[ ]*[a-f0-9]+: 49 0f ae 08 fxrstor64 \(%r8\)
+[ ]*[a-f0-9]+: 49 0f ae 0c 00 fxrstor64 \(%r8,%rax,1\)
+[ ]*[a-f0-9]+: 4a 0f ae 0c 00 fxrstor64 \(%rax,%r8,1\)
+[ ]*[a-f0-9]+: 4b 0f ae 0c 38 fxrstor64 \(%r8,%r15,1\)
+#pass
diff --git a/gas/testsuite/gas/i386/x86-64-fxsave.s b/gas/testsuite/gas/i386/x86-64-fxsave.s
new file mode 100644
index 0000000..c2b1862
--- /dev/null
+++ b/gas/testsuite/gas/i386/x86-64-fxsave.s
@@ -0,0 +1,44 @@
+# Check 64bit fxsave/frstor instructions.
+
+ .text
+foo:
+ fxsave (%rax)
+ fxsave (%r8)
+ fxsave (%r8, %rax)
+ fxsave (%rax, %r8)
+ fxsave (%r8, %r15)
+ fxsave64 (%rax)
+ fxsave64 (%r8)
+ fxsave64 (%r8, %rax)
+ fxsave64 (%rax, %r8)
+ fxrstor (%rax)
+ fxrstor (%r8)
+ fxrstor (%r8, %rax)
+ fxrstor (%rax, %r8)
+ fxrstor (%r8, %r15)
+ fxrstor64 (%rax)
+ fxrstor64 (%r8)
+ fxrstor64 (%r8, %rax)
+ fxrstor64 (%rax, %r8)
+ fxrstor64 (%r8, %r15)
+
+ .intel_syntax noprefix
+fxsave [rax]
+fxsave [r8]
+fxsave [r8+rax*1]
+fxsave [rax+r8*1]
+fxsave [r8+r15*1]
+fxsave64 [rax]
+fxsave64 [r8]
+fxsave64 [r8+rax*1]
+fxsave64 [rax+r8*1]
+fxrstor [rax]
+fxrstor [r8]
+fxrstor [r8+rax*1]
+fxrstor [rax+r8*1]
+fxrstor [r8+r15*1]
+fxrstor64 [rax]
+fxrstor64 [r8]
+fxrstor64 [r8+rax*1]
+fxrstor64 [rax+r8*1]
+fxrstor64 [r8+r15*1]