winebuild: Fix ARM support.
This commit is contained in:
parent
c704758a2f
commit
bbfc0d1d64
|
@ -676,8 +676,10 @@ static void output_import_thunk( const char *name, const char *table, int pos )
|
||||||
output( "\tjmp $31,($0)\n" );
|
output( "\tjmp $31,($0)\n" );
|
||||||
break;
|
break;
|
||||||
case CPU_ARM:
|
case CPU_ARM:
|
||||||
output( "\tmov r4, #%s\n", table );
|
output( "\tldr IP,[PC,#0]\n");
|
||||||
output( "\tldr r15, [r4, #%d]\n", pos );
|
output( "\tmov PC,PC\n");
|
||||||
|
output( "\t%s %s\n", get_asm_ptr_keyword(), table );
|
||||||
|
output( "\tldr PC,[IP,#%d]\n", pos);
|
||||||
break;
|
break;
|
||||||
case CPU_POWERPC:
|
case CPU_POWERPC:
|
||||||
output( "\tmr %s, %s\n", ppc_reg(0), ppc_reg(31) );
|
output( "\tmr %s, %s\n", ppc_reg(0), ppc_reg(31) );
|
||||||
|
@ -992,9 +994,15 @@ static void output_delayed_import_thunks( const DLLSPEC *spec )
|
||||||
output( "\tjmp $31,($0)\n" );
|
output( "\tjmp $31,($0)\n" );
|
||||||
break;
|
break;
|
||||||
case CPU_ARM:
|
case CPU_ARM:
|
||||||
output( "\tstmfd sp!, {r4, r5, r6, r7, r8, r9, r10, lr}\n" );
|
output( "\tstmfd SP!, {r4-r10,FP,LR}\n" );
|
||||||
output( "\tblx %s\n", asm_name("__wine_spec_delay_load") );
|
output( "\tmov LR,PC\n");
|
||||||
output( "\tldmfd sp!, {r4, r5, r6, r7, r8, r9, r10, pc}\n" );
|
output( "\tadd LR,LR,#8\n");
|
||||||
|
output( "\tldr PC,[PC,#-4]\n");
|
||||||
|
output( "\t%s %s\n", get_asm_ptr_keyword(), asm_name("__wine_spec_delay_load") );
|
||||||
|
output( "\tmov IP,r0\n");
|
||||||
|
output( "\tldmfd SP!, {r4-r10,FP,LR}\n" );
|
||||||
|
output( "\tldmfd SP!, {r0-r3}\n" );
|
||||||
|
output( "\tbx IP\n");
|
||||||
break;
|
break;
|
||||||
case CPU_POWERPC:
|
case CPU_POWERPC:
|
||||||
if (target_platform == PLATFORM_APPLE) extra_stack_storage = 56;
|
if (target_platform == PLATFORM_APPLE) extra_stack_storage = 56;
|
||||||
|
@ -1080,7 +1088,17 @@ static void output_delayed_import_thunks( const DLLSPEC *spec )
|
||||||
output( "\tjmp $31,%s\n", asm_name("__wine_delay_load_asm") );
|
output( "\tjmp $31,%s\n", asm_name("__wine_delay_load_asm") );
|
||||||
break;
|
break;
|
||||||
case CPU_ARM:
|
case CPU_ARM:
|
||||||
output( "\tb %s\n", asm_name("__wine_delay_load_asm") );
|
output( "\tstmfd SP!, {r0-r3}\n" );
|
||||||
|
output( "\tmov r0, #%d\n", idx );
|
||||||
|
output( "\tmov r1, #16384\n" );
|
||||||
|
output( "\tmul r1, r0, r1\n" );
|
||||||
|
output( "\tmov r0, r1\n" );
|
||||||
|
output( "\tmov r1, #4\n" );
|
||||||
|
output( "\tmul r1, r0, r1\n" );
|
||||||
|
output( "\tmov r0, r1\n" );
|
||||||
|
output( "\tadd r0, #%d\n", j );
|
||||||
|
output( "\tldr PC,[PC,#-4]\n");
|
||||||
|
output( "\t%s %s\n", get_asm_ptr_keyword(), asm_name("__wine_delay_load_asm") );
|
||||||
break;
|
break;
|
||||||
case CPU_POWERPC:
|
case CPU_POWERPC:
|
||||||
switch(target_platform)
|
switch(target_platform)
|
||||||
|
|
|
@ -396,8 +396,6 @@ static void output_asm_constructor( const char *constructor )
|
||||||
output( "\tjsr $26,%s\n", asm_name(constructor) );
|
output( "\tjsr $26,%s\n", asm_name(constructor) );
|
||||||
break;
|
break;
|
||||||
case CPU_ARM:
|
case CPU_ARM:
|
||||||
output( "\tblx %s\n", asm_name(constructor) );
|
|
||||||
break;
|
|
||||||
case CPU_POWERPC:
|
case CPU_POWERPC:
|
||||||
output( "\tbl %s\n", asm_name(constructor) );
|
output( "\tbl %s\n", asm_name(constructor) );
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -840,11 +840,11 @@ unsigned int get_alignment(unsigned int align)
|
||||||
case CPU_x86:
|
case CPU_x86:
|
||||||
case CPU_x86_64:
|
case CPU_x86_64:
|
||||||
case CPU_SPARC:
|
case CPU_SPARC:
|
||||||
case CPU_ARM:
|
|
||||||
if (target_platform != PLATFORM_APPLE) return align;
|
if (target_platform != PLATFORM_APPLE) return align;
|
||||||
/* fall through */
|
/* fall through */
|
||||||
case CPU_POWERPC:
|
case CPU_POWERPC:
|
||||||
case CPU_ALPHA:
|
case CPU_ALPHA:
|
||||||
|
case CPU_ARM:
|
||||||
n = 0;
|
n = 0;
|
||||||
while ((1u << n) != align) n++;
|
while ((1u << n) != align) n++;
|
||||||
return n;
|
return n;
|
||||||
|
|
Loading…
Reference in New Issue