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

This commit is contained in:
Ge van Geldorp 2006-07-10 08:58:59 +02:00 committed by Alexandre Julliard
parent 6096e5861a
commit 7a15278504
1 changed files with 10 additions and 0 deletions

View File

@ -932,10 +932,20 @@ static void output_delayed_import_thunks( FILE *outfile, const DLLSPEC *spec )
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;