Huw Davies : winebuild: On x86_64, save xmm0 - 3 during the delayed import lookup.

Alexandre Julliard julliard at winehq.org
Tue Jun 26 04:44:30 CDT 2018


Module: wine
Branch: stable
Commit: fab84afd55d293c731ca94f2fc74379f29e33e13
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=fab84afd55d293c731ca94f2fc74379f29e33e13

Author: Huw Davies <huw at codeweavers.com>
Date:   Wed Feb  7 12:47:10 2018 +0000

winebuild: On x86_64, save xmm0 - 3 during the delayed import lookup.

Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit 13fec030e73abe3a54e23288900f6ca528cf6cb0)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>

---

 tools/winebuild/import.c | 40 ++++++++++++++++++++++++----------------
 1 file changed, 24 insertions(+), 16 deletions(-)

diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c
index 01a418f..5e5866c 100644
--- a/tools/winebuild/import.c
+++ b/tools/winebuild/import.c
@@ -943,24 +943,32 @@ static void output_delayed_import_thunks( const DLLSPEC *spec )
         output( "\tjmp *%%eax\n" );
         break;
     case CPU_x86_64:
-        output( "\tsubq $88,%%rsp\n" );
-        output_cfi( ".cfi_adjust_cfa_offset 88" );
-        output( "\tmovq %%rdx,80(%%rsp)\n" );
-        output( "\tmovq %%rcx,72(%%rsp)\n" );
-        output( "\tmovq %%r8,64(%%rsp)\n" );
-        output( "\tmovq %%r9,56(%%rsp)\n" );
-        output( "\tmovq %%r10,48(%%rsp)\n" );
-        output( "\tmovq %%r11,40(%%rsp)\n" );
+        output( "\tsubq $0x98,%%rsp\n" );
+        output_cfi( ".cfi_adjust_cfa_offset 0x98" );
+        output( "\tmovq %%rdx,0x88(%%rsp)\n" );
+        output( "\tmovq %%rcx,0x80(%%rsp)\n" );
+        output( "\tmovq %%r8,0x78(%%rsp)\n" );
+        output( "\tmovq %%r9,0x70(%%rsp)\n" );
+        output( "\tmovq %%r10,0x68(%%rsp)\n" );
+        output( "\tmovq %%r11,0x60(%%rsp)\n" );
+        output( "\tmovups %%xmm0,0x50(%%rsp)\n" );
+        output( "\tmovups %%xmm1,0x40(%%rsp)\n" );
+        output( "\tmovups %%xmm2,0x30(%%rsp)\n" );
+        output( "\tmovups %%xmm3,0x20(%%rsp)\n" );
         output( "\tmovq %%rax,%%rcx\n" );
         output( "\tcall %s\n", asm_name("__wine_spec_delay_load") );
-        output( "\tmovq 40(%%rsp),%%r11\n" );
-        output( "\tmovq 48(%%rsp),%%r10\n" );
-        output( "\tmovq 56(%%rsp),%%r9\n" );
-        output( "\tmovq 64(%%rsp),%%r8\n" );
-        output( "\tmovq 72(%%rsp),%%rcx\n" );
-        output( "\tmovq 80(%%rsp),%%rdx\n" );
-        output( "\taddq $88,%%rsp\n" );
-        output_cfi( ".cfi_adjust_cfa_offset -88" );
+        output( "\tmovups 0x20(%%rsp),%%xmm3\n" );
+        output( "\tmovups 0x30(%%rsp),%%xmm2\n" );
+        output( "\tmovups 0x40(%%rsp),%%xmm1\n" );
+        output( "\tmovups 0x50(%%rsp),%%xmm0\n" );
+        output( "\tmovq 0x60(%%rsp),%%r11\n" );
+        output( "\tmovq 0x68(%%rsp),%%r10\n" );
+        output( "\tmovq 0x70(%%rsp),%%r9\n" );
+        output( "\tmovq 0x78(%%rsp),%%r8\n" );
+        output( "\tmovq 0x80(%%rsp),%%rcx\n" );
+        output( "\tmovq 0x88(%%rsp),%%rdx\n" );
+        output( "\taddq $0x98,%%rsp\n" );
+        output_cfi( ".cfi_adjust_cfa_offset -0x98" );
         output( "\tjmp *%%rax\n" );
         break;
     case CPU_ARM:




More information about the wine-cvs mailing list