Ge van Geldorp : winebuild: Save registers which might contain parameters for the function to be called .

Alexandre Julliard julliard at wine.codeweavers.com
Tue Jul 11 11:03:11 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: 7a15278504eec7b924c43993e120dc2733c4eeb4
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=7a15278504eec7b924c43993e120dc2733c4eeb4

Author: Ge van Geldorp <ge at gse.nl>
Date:   Mon Jul 10 08:58:59 2006 +0200

winebuild: Save registers which might contain parameters for the function to be called.

---

 tools/winebuild/import.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c
index 3dcab2d..c06512a 100644
--- a/tools/winebuild/import.c
+++ b/tools/winebuild/import.c
@@ -932,10 +932,20 @@ static void output_delayed_import_thunks
         break;
     case CPU_x86_64:
         fprintf( outfile, "\tpushq %%rdi\n" );
+        fprintf( outfile, "\tpushq %%rsi\n" );
+        fprintf( outfile, "\tpushq %%rdx\n" );
+        fprintf( outfile, "\tpushq %%rcx\n" );
+        fprintf( outfile, "\tpushq %%r8\n" );
+        fprintf( outfile, "\tpushq %%r9\n" );
         fprintf( outfile, "\tsubq $8,%%rsp\n" );
         fprintf( outfile, "\tmovq %%r11,%%rdi\n" );
         fprintf( outfile, "\tcall %s\n", asm_name("__wine_spec_delay_load") );
         fprintf( outfile, "\taddq $8,%%rsp\n" );
+        fprintf( outfile, "\tpopq %%r9\n" );
+        fprintf( outfile, "\tpopq %%r8\n" );
+        fprintf( outfile, "\tpopq %%rcx\n" );
+        fprintf( outfile, "\tpopq %%rdx\n" );
+        fprintf( outfile, "\tpopq %%rsi\n" );
         fprintf( outfile, "\tpopq %%rdi\n" );
         fprintf( outfile, "\tjmp *%%rax\n" );
         break;




More information about the wine-cvs mailing list