summaryrefslogtreecommitdiffstats
path: root/gas/testsuite/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/testsuite/gas
parent90f5d9d96125bc43fc8c332ed9450d9e8bf4f5b0 (diff)
downloadppe42-binutils-eacc9c891d71cfef7f5c1f152291daeab785b3d4.tar.gz
ppe42-binutils-eacc9c891d71cfef7f5c1f152291daeab785b3d4.zip
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/testsuite/gas')
-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
5 files changed, 147 insertions, 4 deletions
diff --git a/gas/testsuite/gas/i386/i386.exp b/gas/testsuite/gas/i386/i386.exp
index 0e6d10bd52..f4f8a5d0e0 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 97b78544ec..3548ff231c 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 0000000000..6af38d1627
--- /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 0000000000..5fd9d842a4
--- /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 0000000000..c2b1862c25
--- /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]
OpenPOWER on IntegriCloud