1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00

winebuild: Remove some no longer used support for ELF ARM platforms.

This commit is contained in:
Alexandre Julliard 2024-02-27 12:51:46 +01:00
parent 8351a45cb2
commit 4e25c07689
4 changed files with 19 additions and 104 deletions

View file

@ -301,8 +301,6 @@ extern const char *get_asm_export_section(void);
extern const char *get_asm_rodata_section(void);
extern const char *get_asm_rsrc_section(void);
extern const char *get_asm_string_section(void);
extern const char *arm64_page( const char *sym );
extern const char *arm64_pageoff( const char *sym );
extern void output_function_header( const char *func, int global );
extern void output_function_size( const char *name );
extern void output_gnu_stack_note(void);

View file

@ -777,19 +777,7 @@ static void output_import_thunk( const char *name, const char *table, int pos )
case CPU_x86_64:
output( "\tjmpq *%s+%d(%%rip)\n", table, pos );
break;
case CPU_ARM:
output( "\tldr ip, 1f\n");
output( "\tldr pc, [ip]\n");
output( "1:\t.long %s+%u\n", table, pos );
break;
case CPU_ARM64:
output( "\tadrp x16, %s\n", arm64_page( table ) );
output( "\tadd x16, x16, #%s\n", arm64_pageoff( table ) );
if (pos & ~0x7fff) output( "\tadd x16, x16, #%u\n", pos & ~0x7fff );
output( "\tldr x16, [x16, #%u]\n", pos & 0x7fff );
output( "\tbr x16\n" );
break;
case CPU_ARM64EC:
default:
assert( 0 );
break;
}
@ -1077,9 +1065,7 @@ static void output_delayed_import_thunks( const DLLSPEC *spec )
output_cfi( ".cfi_adjust_cfa_offset -0x98" );
output( "\tjmp *%%rax\n" );
break;
case CPU_ARM:
case CPU_ARM64:
case CPU_ARM64EC:
default:
assert( 0 );
break;
}
@ -1109,9 +1095,7 @@ static void output_delayed_import_thunks( const DLLSPEC *spec )
output( "\tleaq .L__wine_delay_IAT+%d(%%rip),%%rax\n", iat_pos );
output( "\tjmp %s\n", asm_name(module_func) );
break;
case CPU_ARM:
case CPU_ARM64:
case CPU_ARM64EC:
default:
assert( 0 );
break;
}
@ -1274,14 +1258,12 @@ void output_stubs( DLLSPEC *spec )
case CPU_ARM64EC:
output( "\t.seh_proc %s\n", arm64_name(name) );
output( "\t.seh_endprologue\n" );
output( "\tadrp x0, %s\n", arm64_page(".L__wine_spec_file_name") );
output( "\tadd x0, x0, #%s\n", arm64_pageoff(".L__wine_spec_file_name") );
output( "\tadrp x0, .L__wine_spec_file_name\n" );
output( "\tadd x0, x0, #:lo12:.L__wine_spec_file_name\n" );
if (exp_name)
{
char *sym = strmake( ".L%s_string", name );
output( "\tadrp x1, %s\n", arm64_page( sym ) );
output( "\tadd x1, x1, #%s\n", arm64_pageoff( sym ) );
free( sym );
output( "\tadrp x1, .L%s_string\n", name );
output( "\tadd x1, x1, #:lo12:.L%s_string\n", name );
}
else
output( "\tmov x1, %u\n", odp->ordinal );
@ -1532,7 +1514,7 @@ static void build_windows_import_lib( const char *lib_name, DLLSPEC *spec, struc
output( "\tstp x6, x7, [sp, #64]\n" );
output( "\tmov x1, x16\n" );
output( "\tadrp x0, %s\n", asm_name( import_desc ) );
output( "\tadd x0, x0, #%s\n", asm_name( import_desc ) );
output( "\tadd x0, x0, #:lo12:%s\n", asm_name( import_desc ) );
output( "\tbl __delayLoadHelper2\n" );
output( "\tmov x16, x0\n" );
output( "\tldp x0, x1, [sp, #16]\n" );
@ -1677,15 +1659,15 @@ static void build_windows_import_lib( const char *lib_name, DLLSPEC *spec, struc
output( "1:\t.long %s\n", asm_name( imp_name ) );
break;
case CPU_ARM64:
output( "\tadrp x16, %s\n", arm64_page( asm_name( imp_name ) ) );
output( "\tadd x16, x16, #%s\n", arm64_pageoff( asm_name( imp_name ) ) );
output( "\tadrp x16, %s\n", asm_name( imp_name ) );
output( "\tadd x16, x16, #:lo12:%s\n", asm_name( imp_name ) );
output( "\tbr x16\n" );
if (is_delay)
{
output( "\n\t.section .text$1\n" );
output( ".L__wine_delay_import:\n" );
output( "\tadrp x16, %s\n", arm64_page( asm_name( imp_name ) ) );
output( "\tadd x16, x16, #%s\n", arm64_pageoff( asm_name( imp_name ) ) );
output( "\tadrp x16, %s\n", asm_name( imp_name ) );
output( "\tadd x16, x16, #:lo12:%s\n", asm_name( imp_name ) );
output( "\tb %s\n", asm_name( delay_load ) );
}
break;

View file

@ -352,8 +352,8 @@ static void output_relay_debug( struct exports *exports )
output( "\tstp x8, x9, [SP,#-16]!\n" );
output( "\tmov w1, #%u\n", odp->u.func.args_str_offset << 16 );
if (i - exports->base) output( "\tadd w1, w1, #%u\n", i - exports->base );
output( "\tadrp x0, %s\n", arm64_page(".L__wine_spec_relay_descr") );
output( "\tadd x0, x0, #%s\n", arm64_pageoff(".L__wine_spec_relay_descr") );
output( "\tadrp x0, .L__wine_spec_relay_descr\n" );
output( "\tadd x0, x0, #:lo12:.L__wine_spec_relay_descr\n" );
output( "\tldr x3, [x0, #8]\n");
output( "\tblr x3\n");
output( "\tmov sp, x29\n" );
@ -636,25 +636,8 @@ void output_module( DLLSPEC *spec )
output( "\t.skip %u\n", 65536 + page_size );
break;
default:
switch (target.cpu)
{
case CPU_i386:
case CPU_x86_64:
output( "\n\t.section \".init\",\"ax\"\n" );
output( "\tjmp 1f\n" );
break;
case CPU_ARM:
output( "\n\t.section \".text\",\"ax\"\n" );
output( "\tb 1f\n" );
break;
case CPU_ARM64:
output( "\n\t.section \".init\",\"ax\"\n" );
output( "\tb 1f\n" );
break;
case CPU_ARM64EC:
assert( 0 );
break;
}
output( "\n\t.section \".init\",\"ax\"\n" );
output( "\tjmp 1f\n" );
output( "__wine_spec_pe_header:\n" );
output( "\t.skip %u\n", 65536 + page_size );
output( "1:\n" );

View file

@ -823,15 +823,8 @@ const char *asm_name( const char *sym )
/* return the assembly name for an ARM64/ARM64EC function */
const char *arm64_name( const char *sym )
{
switch (target.platform)
{
case PLATFORM_MINGW:
case PLATFORM_WINDOWS:
if (target.cpu == CPU_ARM64EC) return strmake( "\"#%s\"", sym );
/* fall through */
default:
return asm_name( sym );
}
if (target.cpu == CPU_ARM64EC) return strmake( "\"#%s\"", sym );
return asm_name( sym );
}
/* return an assembly function declaration for a C function name */
@ -967,16 +960,7 @@ void output_gnu_stack_note(void)
case PLATFORM_APPLE:
break;
default:
switch (target.cpu)
{
case CPU_ARM:
case CPU_ARM64:
output( "\t.section .note.GNU-stack,\"\",%%progbits\n" );
break;
default:
output( "\t.section .note.GNU-stack,\"\",@progbits\n" );
break;
}
output( "\t.section .note.GNU-stack,\"\",@progbits\n" );
break;
}
}
@ -1067,35 +1051,3 @@ const char *get_asm_string_section(void)
default: return ".section .rodata";
}
}
const char *arm64_page( const char *sym )
{
static char *buffer;
switch (target.platform)
{
case PLATFORM_APPLE:
free( buffer );
buffer = strmake( "%s@PAGE", sym );
return buffer;
default:
return sym;
}
}
const char *arm64_pageoff( const char *sym )
{
static char *buffer;
free( buffer );
switch (target.platform)
{
case PLATFORM_APPLE:
buffer = strmake( "%s@PAGEOFF", sym );
break;
default:
buffer = strmake( ":lo12:%s", sym );
break;
}
return buffer;
}