Commit 955664c8 authored by Alexandre Julliard's avatar Alexandre Julliard

winebuild: Add a helper to build an ARM64EC function name.

parent 7b216b69
......@@ -287,6 +287,7 @@ extern int sort_func_list( ORDDEF **list, int count, int (*compare)(const void *
extern unsigned int get_page_size(void);
extern unsigned int get_args_size( const ORDDEF *odp );
extern const char *asm_name( const char *func );
extern const char *arm64_name( const char *func );
extern const char *asm_globl( const char *func );
extern const char *get_asm_ptr_keyword(void);
extern const char *get_asm_string_keyword(void);
......
......@@ -1347,7 +1347,7 @@ void output_stubs( DLLSPEC *spec )
break;
case CPU_ARM64:
case CPU_ARM64EC:
output_seh( ".seh_proc %s", asm_name(name) );
output_seh( ".seh_proc %s", arm64_name(name) );
output_seh( ".seh_endprologue" );
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") );
......@@ -1360,7 +1360,7 @@ void output_stubs( DLLSPEC *spec )
}
else
output( "\tmov x1, %u\n", odp->ordinal );
output( "\tb %s\n", asm_name("__wine_spec_unimplemented_stub") );
output( "\tb %s\n", arm64_name("__wine_spec_unimplemented_stub") );
output_seh( ".seh_endproc" );
break;
}
......@@ -1476,7 +1476,7 @@ void output_syscalls( DLLSPEC *spec )
break;
case CPU_ARM64:
case CPU_ARM64EC:
output_seh( ".seh_proc %s", asm_name(name) );
output_seh( ".seh_proc %s", arm64_name(name) );
output_seh( ".seh_endprologue" );
output( "\tmov x8, #%u\n", id );
output( "\tmov x9, x30\n" );
......
......@@ -828,10 +828,24 @@ 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 );
}
}
/* return an assembly function declaration for a C function name */
void output_function_header( const char *func, int global )
{
const char *name = asm_name( func );
const char *name = arm64_name( func );
output( "\t.text\n" );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment