]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Add xsave64 and xrstor64.
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 21 Jan 2010 17:30:14 +0000 (17:30 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 21 Jan 2010 17:30:14 +0000 (17:30 +0000)
gas/testsuite/

2010-02-21  H.J. Lu  <hongjiu.lu@intel.com>

* gas/i386/x86-64-xsave.s: Add tests for xsave64 and xrstor64.

* gas/i386/x86-64-xsave-intel.d: Updated.
* gas/i386/x86-64-xsave.d: Likewise.

opcodes/

2010-02-21  H.J. Lu  <hongjiu.lu@intel.com>

* i386-dis.c (mod_table): Use FXSAVE on xsave and xrstor.

* i386-opc.tbl: Add xsave64 and xrstor64.
* i386-tbl.h: Regenerated.

gas/testsuite/ChangeLog
gas/testsuite/gas/i386/x86-64-xsave-intel.d
gas/testsuite/gas/i386/x86-64-xsave.d
gas/testsuite/gas/i386/x86-64-xsave.s
opcodes/ChangeLog
opcodes/i386-dis.c
opcodes/i386-opc.tbl
opcodes/i386-tbl.h

index 28b47134096d64cb0bb82cd48d728bcb8f0e6433..925191ed37ac42604bc87ffad943c268b2a22240 100644 (file)
@@ -1,3 +1,10 @@
+2010-02-21  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * gas/i386/x86-64-xsave.s: Add tests for xsave64 and xrstor64.
+
+       * gas/i386/x86-64-xsave-intel.d: Updated.
+       * gas/i386/x86-64-xsave.d: Likewise.
+
 2010-01-20  Nick Clifton  <nickc@redhat.com>
 
        PR 11109
index 4659a2ee933f2195bc41104d5c94a2f244ee489a..ae506d6d0300a190c74564a27622b3a15ea0400b 100644 (file)
@@ -8,10 +8,44 @@
 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\]
+[      ]*[a-f0-9]+:    0f ae 20                xsave  \[rax\]
+[      ]*[a-f0-9]+:    41 0f ae 20             xsave  \[r8\]
+[      ]*[a-f0-9]+:    41 0f ae 24 00          xsave  \[r8\+rax\*1\]
+[      ]*[a-f0-9]+:    42 0f ae 24 00          xsave  \[rax\+r8\*1\]
+[      ]*[a-f0-9]+:    43 0f ae 24 38          xsave  \[r8\+r15\*1\]
+[      ]*[a-f0-9]+:    48 0f ae 20             xsave64 \[rax\]
+[      ]*[a-f0-9]+:    49 0f ae 20             xsave64 \[r8\]
+[      ]*[a-f0-9]+:    49 0f ae 24 00          xsave64 \[r8\+rax\*1\]
+[      ]*[a-f0-9]+:    4a 0f ae 24 00          xsave64 \[rax\+r8\*1\]
+[      ]*[a-f0-9]+:    0f ae 28                xrstor \[rax\]
+[      ]*[a-f0-9]+:    41 0f ae 28             xrstor \[r8\]
+[      ]*[a-f0-9]+:    41 0f ae 2c 00          xrstor \[r8\+rax\*1\]
+[      ]*[a-f0-9]+:    42 0f ae 2c 00          xrstor \[rax\+r8\*1\]
+[      ]*[a-f0-9]+:    43 0f ae 2c 38          xrstor \[r8\+r15\*1\]
+[      ]*[a-f0-9]+:    48 0f ae 28             xrstor64 \[rax\]
+[      ]*[a-f0-9]+:    49 0f ae 28             xrstor64 \[r8\]
+[      ]*[a-f0-9]+:    49 0f ae 2c 00          xrstor64 \[r8\+rax\*1\]
+[      ]*[a-f0-9]+:    4a 0f ae 2c 00          xrstor64 \[rax\+r8\*1\]
+[      ]*[a-f0-9]+:    4b 0f ae 2c 38          xrstor64 \[r8\+r15\*1\]
+[      ]*[a-f0-9]+:    0f ae 20                xsave  \[rax\]
+[      ]*[a-f0-9]+:    41 0f ae 20             xsave  \[r8\]
+[      ]*[a-f0-9]+:    41 0f ae 24 00          xsave  \[r8\+rax\*1\]
+[      ]*[a-f0-9]+:    42 0f ae 24 00          xsave  \[rax\+r8\*1\]
+[      ]*[a-f0-9]+:    43 0f ae 24 38          xsave  \[r8\+r15\*1\]
+[      ]*[a-f0-9]+:    48 0f ae 20             xsave64 \[rax\]
+[      ]*[a-f0-9]+:    49 0f ae 20             xsave64 \[r8\]
+[      ]*[a-f0-9]+:    49 0f ae 24 00          xsave64 \[r8\+rax\*1\]
+[      ]*[a-f0-9]+:    4a 0f ae 24 00          xsave64 \[rax\+r8\*1\]
+[      ]*[a-f0-9]+:    0f ae 28                xrstor \[rax\]
+[      ]*[a-f0-9]+:    41 0f ae 28             xrstor \[r8\]
+[      ]*[a-f0-9]+:    41 0f ae 2c 00          xrstor \[r8\+rax\*1\]
+[      ]*[a-f0-9]+:    42 0f ae 2c 00          xrstor \[rax\+r8\*1\]
+[      ]*[a-f0-9]+:    43 0f ae 2c 38          xrstor \[r8\+r15\*1\]
+[      ]*[a-f0-9]+:    48 0f ae 28             xrstor64 \[rax\]
+[      ]*[a-f0-9]+:    49 0f ae 28             xrstor64 \[r8\]
+[      ]*[a-f0-9]+:    49 0f ae 2c 00          xrstor64 \[r8\+rax\*1\]
+[      ]*[a-f0-9]+:    4a 0f ae 2c 00          xrstor64 \[rax\+r8\*1\]
+[      ]*[a-f0-9]+:    4b 0f ae 2c 38          xrstor64 \[r8\+r15\*1\]
 #pass
index cf07cda7fdfbdb078dacafd4a75314cd8dd8f8ac..05114fb9e327c53811988fd19c9e19732f5a18b8 100644 (file)
@@ -6,10 +6,44 @@
 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\)
+[      ]*[a-f0-9]+:    0f ae 20                xsave  \(%rax\)
+[      ]*[a-f0-9]+:    41 0f ae 20             xsave  \(%r8\)
+[      ]*[a-f0-9]+:    41 0f ae 24 00          xsave  \(%r8,%rax,1\)
+[      ]*[a-f0-9]+:    42 0f ae 24 00          xsave  \(%rax,%r8,1\)
+[      ]*[a-f0-9]+:    43 0f ae 24 38          xsave  \(%r8,%r15,1\)
+[      ]*[a-f0-9]+:    48 0f ae 20             xsave64 \(%rax\)
+[      ]*[a-f0-9]+:    49 0f ae 20             xsave64 \(%r8\)
+[      ]*[a-f0-9]+:    49 0f ae 24 00          xsave64 \(%r8,%rax,1\)
+[      ]*[a-f0-9]+:    4a 0f ae 24 00          xsave64 \(%rax,%r8,1\)
+[      ]*[a-f0-9]+:    0f ae 28                xrstor \(%rax\)
+[      ]*[a-f0-9]+:    41 0f ae 28             xrstor \(%r8\)
+[      ]*[a-f0-9]+:    41 0f ae 2c 00          xrstor \(%r8,%rax,1\)
+[      ]*[a-f0-9]+:    42 0f ae 2c 00          xrstor \(%rax,%r8,1\)
+[      ]*[a-f0-9]+:    43 0f ae 2c 38          xrstor \(%r8,%r15,1\)
+[      ]*[a-f0-9]+:    48 0f ae 28             xrstor64 \(%rax\)
+[      ]*[a-f0-9]+:    49 0f ae 28             xrstor64 \(%r8\)
+[      ]*[a-f0-9]+:    49 0f ae 2c 00          xrstor64 \(%r8,%rax,1\)
+[      ]*[a-f0-9]+:    4a 0f ae 2c 00          xrstor64 \(%rax,%r8,1\)
+[      ]*[a-f0-9]+:    4b 0f ae 2c 38          xrstor64 \(%r8,%r15,1\)
+[      ]*[a-f0-9]+:    0f ae 20                xsave  \(%rax\)
+[      ]*[a-f0-9]+:    41 0f ae 20             xsave  \(%r8\)
+[      ]*[a-f0-9]+:    41 0f ae 24 00          xsave  \(%r8,%rax,1\)
+[      ]*[a-f0-9]+:    42 0f ae 24 00          xsave  \(%rax,%r8,1\)
+[      ]*[a-f0-9]+:    43 0f ae 24 38          xsave  \(%r8,%r15,1\)
+[      ]*[a-f0-9]+:    48 0f ae 20             xsave64 \(%rax\)
+[      ]*[a-f0-9]+:    49 0f ae 20             xsave64 \(%r8\)
+[      ]*[a-f0-9]+:    49 0f ae 24 00          xsave64 \(%r8,%rax,1\)
+[      ]*[a-f0-9]+:    4a 0f ae 24 00          xsave64 \(%rax,%r8,1\)
+[      ]*[a-f0-9]+:    0f ae 28                xrstor \(%rax\)
+[      ]*[a-f0-9]+:    41 0f ae 28             xrstor \(%r8\)
+[      ]*[a-f0-9]+:    41 0f ae 2c 00          xrstor \(%r8,%rax,1\)
+[      ]*[a-f0-9]+:    42 0f ae 2c 00          xrstor \(%rax,%r8,1\)
+[      ]*[a-f0-9]+:    43 0f ae 2c 38          xrstor \(%r8,%r15,1\)
+[      ]*[a-f0-9]+:    48 0f ae 28             xrstor64 \(%rax\)
+[      ]*[a-f0-9]+:    49 0f ae 28             xrstor64 \(%r8\)
+[      ]*[a-f0-9]+:    49 0f ae 2c 00          xrstor64 \(%r8,%rax,1\)
+[      ]*[a-f0-9]+:    4a 0f ae 2c 00          xrstor64 \(%rax,%r8,1\)
+[      ]*[a-f0-9]+:    4b 0f ae 2c 38          xrstor64 \(%r8,%r15,1\)
 #pass
index 076706f8ccfc4d71f8c3e3471ec2322d0143dbd8..b32dc6eec54d7634116d38a72eb7835cbcc5c135 100644 (file)
@@ -1,11 +1,46 @@
 # Check 64bit xsave/xrstor
        .text
 _start:
-       xrstor          (%r9)
-       xsave           (%r9)
        xgetbv
        xsetbv
 
+       xsave (%rax)
+       xsave (%r8)
+       xsave (%r8, %rax)
+       xsave (%rax, %r8)
+       xsave (%r8, %r15)
+       xsave64 (%rax)
+       xsave64 (%r8)
+       xsave64 (%r8, %rax)
+       xsave64 (%rax, %r8)
+       xrstor (%rax)
+       xrstor (%r8)
+       xrstor (%r8, %rax)
+       xrstor (%rax, %r8)
+       xrstor (%r8, %r15)
+       xrstor64 (%rax)
+       xrstor64 (%r8)
+       xrstor64 (%r8, %rax)
+       xrstor64 (%rax, %r8)
+       xrstor64 (%r8, %r15)
+
        .intel_syntax noprefix
-       xrstor          [rcx]
-       xsave           [rcx]
+       xsave [rax]
+       xsave [r8]
+       xsave [r8+rax*1]
+       xsave [rax+r8*1]
+       xsave [r8+r15*1]
+       xsave64 [rax]
+       xsave64 [r8]
+       xsave64 [r8+rax*1]
+       xsave64 [rax+r8*1]
+       xrstor [rax]
+       xrstor [r8]
+       xrstor [r8+rax*1]
+       xrstor [rax+r8*1]
+       xrstor [r8+r15*1]
+       xrstor64 [rax]
+       xrstor64 [r8]
+       xrstor64 [r8+rax*1]
+       xrstor64 [rax+r8*1]
+       xrstor64 [r8+r15*1]
index a403d40bb6981f827f334d5594317002e11fd6b6..b126987c59f0851277736a8398921bd62c9992e1 100644 (file)
@@ -1,3 +1,10 @@
+2010-02-21  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * i386-dis.c (mod_table): Use FXSAVE on xsave and xrstor.
+
+       * i386-opc.tbl: Add xsave64 and xrstor64.
+       * i386-tbl.h: Regenerated.
+
 2010-01-20  Nick Clifton  <nickc@redhat.com>
 
        PR 11170
index 72e39a1cdbb572503c28935e73d5182fbd37b6b2..20decd14232aa6f5ef49dadeed1a932d60417713 100644 (file)
@@ -11127,17 +11127,17 @@ static const struct dis386 mod_table[][2] = {
   },
   {
     /* MOD_0FAE_REG_4 */
-    { "xsave",         { M } },
+    { "xsave",         { FXSAVE } },
     { "(bad)",         { XX } },
   },
   {
     /* MOD_0FAE_REG_5 */
-    { "xrstor",                { M } },
+    { "xrstor",                { FXSAVE } },
     { RM_TABLE (RM_0FAE_REG_5) },
   },
   {
     /* MOD_0FAE_REG_6 */
-    { "xsaveopt",      { M } },
+    { "(bad)",         { XX } },
     { RM_TABLE (RM_0FAE_REG_6) },
   },
   {
index 05e4e10901224a3eb91fe5c5c1cedf42fb05901c..81195567ee025a73a5be1ce6ae3014693e30015b 100644 (file)
@@ -1748,7 +1748,9 @@ crc32, 2, 0xf20f38f0, None, 3, CpuSSE4_2|Cpu64, Modrm|No_wSuf|No_lSuf|No_sSuf|No
 // xsave/xrstor New Instructions.
 
 xsave, 1, 0xfae, 0x4, 2, CpuXsave, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_ldSuf, { Unspecified|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+xsave64, 1, 0xfae, 0x4, 2, CpuXsave|Cpu64, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_ldSuf|Rex64, { Unspecified|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
 xrstor, 1, 0xfae, 0x5, 2, CpuXsave, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_ldSuf, { Unspecified|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
+xrstor64, 1, 0xfae, 0x5, 2, CpuXsave|Cpu64, Modrm|No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_ldSuf|Rex64, { Unspecified|BaseIndex|Disp8|Disp16|Disp32|Disp32S }
 xgetbv, 0, 0xf01, 0xd0, 2, CpuXsave, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf|ImmExt, { 0 }
 xsetbv, 0, 0xf01, 0xd1, 2, CpuXsave, No_bSuf|No_wSuf|No_lSuf|No_sSuf|No_qSuf|No_ldSuf|ImmExt, { 0 }
 
index 79d71a7e4c021d018ec3517ba8a9e6217406e9cb..461ffe3af048185c21a5efabfa39bdc128909fd7 100644 (file)
@@ -17798,6 +17798,16 @@ const insn_template i386_optab[] =
     { { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
          1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
          0, 0, 1, 0, 0 } } } },
+  { "xsave64", 1, 0xfae, 0x4, 2,
+    { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+        0, 1, 0, 0 } },
+    { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 
+      1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0 },
+    { { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+         1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+         0, 0, 1, 0, 0 } } } },
   { "xrstor", 1, 0xfae, 0x5, 2,
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
@@ -17808,6 +17818,16 @@ const insn_template i386_optab[] =
     { { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
          1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
          0, 0, 1, 0, 0 } } } },
+  { "xrstor64", 1, 0xfae, 0x5, 2,
+    { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+        0, 1, 0, 0 } },
+    { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 
+      1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 
+      0, 0, 0, 0, 0, 0, 0, 0, 0 },
+    { { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+         1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+         0, 0, 1, 0, 0 } } } },
   { "xgetbv", 0, 0xf01, 0xd0, 2,
     { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,