mirror of
https://github.com/reactos/wine.git
synced 2024-12-01 15:40:43 +00:00
Implemented import thunks for x86-64.
This commit is contained in:
parent
6b5f290d75
commit
8c6649e457
@ -619,7 +619,6 @@ static void output_import_thunk( FILE *outfile, const char *name, const char *ta
|
||||
|
||||
switch(target_cpu)
|
||||
{
|
||||
case CPU_x86_64: /* FIXME */
|
||||
case CPU_x86:
|
||||
if (!UsePIC)
|
||||
{
|
||||
@ -671,6 +670,9 @@ static void output_import_thunk( FILE *outfile, const char *name, const char *ta
|
||||
}
|
||||
}
|
||||
break;
|
||||
case CPU_x86_64:
|
||||
fprintf( outfile, "\tjmpq *%s+%d(%%rip)\n", table, pos );
|
||||
break;
|
||||
case CPU_SPARC:
|
||||
if ( !UsePIC )
|
||||
{
|
||||
@ -956,7 +958,6 @@ static void output_delayed_import_thunks( FILE *outfile, const DLLSPEC *spec )
|
||||
fprintf( outfile, "%s:\n", asm_name("__wine_delay_load_asm") );
|
||||
switch(target_cpu)
|
||||
{
|
||||
case CPU_x86_64: /* FIXME */
|
||||
case CPU_x86:
|
||||
fprintf( outfile, "\tpushl %%ecx\n" );
|
||||
fprintf( outfile, "\tpushl %%edx\n" );
|
||||
@ -966,6 +967,15 @@ static void output_delayed_import_thunks( FILE *outfile, const DLLSPEC *spec )
|
||||
fprintf( outfile, "\tpopl %%ecx\n" );
|
||||
fprintf( outfile, "\tjmp *%%eax\n" );
|
||||
break;
|
||||
case CPU_x86_64:
|
||||
fprintf( outfile, "\tpushq %%rdi\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 %%rdi\n" );
|
||||
fprintf( outfile, "\tjmp *%%rax\n" );
|
||||
break;
|
||||
case CPU_SPARC:
|
||||
fprintf( outfile, "\tsave %%sp, -96, %%sp\n" );
|
||||
fprintf( outfile, "\tcall %s\n", asm_name("__wine_spec_delay_load") );
|
||||
@ -1041,11 +1051,14 @@ static void output_delayed_import_thunks( FILE *outfile, const DLLSPEC *spec )
|
||||
fprintf( outfile, ".L__wine_delay_imp_%d_%s:\n", i, name );
|
||||
switch(target_cpu)
|
||||
{
|
||||
case CPU_x86_64: /* FIXME */
|
||||
case CPU_x86:
|
||||
fprintf( outfile, "\tmovl $%d, %%eax\n", (idx << 16) | j );
|
||||
fprintf( outfile, "\tjmp %s\n", asm_name("__wine_delay_load_asm") );
|
||||
break;
|
||||
case CPU_x86_64:
|
||||
fprintf( outfile, "\tmovq $%d,%%r11\n", (idx << 16) | j );
|
||||
fprintf( outfile, "\tjmp %s\n", asm_name("__wine_delay_load_asm") );
|
||||
break;
|
||||
case CPU_SPARC:
|
||||
fprintf( outfile, "\tset %d, %%g1\n", (idx << 16) | j );
|
||||
fprintf( outfile, "\tb,a %s\n", asm_name("__wine_delay_load_asm") );
|
||||
|
Loading…
Reference in New Issue
Block a user