winebuild: Rename __wine_call_from_32_regs for consistency with 64-bit.
This commit is contained in:
parent
c7ccf24020
commit
102dd9e92f
|
@ -287,7 +287,7 @@ static inline struct kernel_thread_data *kernel_get_thread_data(void)
|
||||||
".byte 0x68\n\t" /* pushl $__regs_func */ \
|
".byte 0x68\n\t" /* pushl $__regs_func */ \
|
||||||
".long " __ASM_NAME("__regs_") #name "-.-11\n\t" \
|
".long " __ASM_NAME("__regs_") #name "-.-11\n\t" \
|
||||||
".byte 0x6a," #args "\n\t" /* pushl $args */ \
|
".byte 0x6a," #args "\n\t" /* pushl $args */ \
|
||||||
"call " __ASM_NAME("__wine_call_from_32_regs") "\n\t" \
|
"call " __ASM_NAME("__wine_call_from_regs") "\n\t" \
|
||||||
"ret $(4*" #args ")" ) /* fake ret to make copy protections happy */
|
"ret $(4*" #args ")" ) /* fake ret to make copy protections happy */
|
||||||
|
|
||||||
#endif /* __WINE_KERNEL16_PRIVATE_H */
|
#endif /* __WINE_KERNEL16_PRIVATE_H */
|
||||||
|
|
|
@ -237,7 +237,7 @@ static inline struct ntdll_thread_data *ntdll_get_thread_data(void)
|
||||||
".byte 0x68\n\t" /* pushl $__regs_func */ \
|
".byte 0x68\n\t" /* pushl $__regs_func */ \
|
||||||
".long " __ASM_NAME("__regs_") #name "-.-11\n\t" \
|
".long " __ASM_NAME("__regs_") #name "-.-11\n\t" \
|
||||||
".byte 0x6a," #args "\n\t" /* pushl $args */ \
|
".byte 0x6a," #args "\n\t" /* pushl $args */ \
|
||||||
"call " __ASM_NAME("__wine_call_from_32_regs") "\n\t" \
|
"call " __ASM_NAME("__wine_call_from_regs") "\n\t" \
|
||||||
"ret $(4*" #args ")" ) /* fake ret to make copy protections happy */
|
"ret $(4*" #args ")" ) /* fake ret to make copy protections happy */
|
||||||
#elif defined(__x86_64__)
|
#elif defined(__x86_64__)
|
||||||
#define DEFINE_REGS_ENTRYPOINT( name, args ) \
|
#define DEFINE_REGS_ENTRYPOINT( name, args ) \
|
||||||
|
|
|
@ -423,7 +423,7 @@ static wine_signal_handler handlers[256];
|
||||||
|
|
||||||
static int fpux_support; /* whether the CPU support extended fpu context */
|
static int fpux_support; /* whether the CPU support extended fpu context */
|
||||||
|
|
||||||
extern void DECLSPEC_NORETURN __wine_call_from_32_restore_regs( const CONTEXT *context );
|
extern void DECLSPEC_NORETURN __wine_restore_regs( const CONTEXT *context );
|
||||||
|
|
||||||
enum i386_trap_code
|
enum i386_trap_code
|
||||||
{
|
{
|
||||||
|
@ -1173,7 +1173,7 @@ void set_cpu_context( const CONTEXT *context )
|
||||||
if (!(flags & CONTEXT_CONTROL))
|
if (!(flags & CONTEXT_CONTROL))
|
||||||
FIXME( "setting partial context (%x) not supported\n", flags );
|
FIXME( "setting partial context (%x) not supported\n", flags );
|
||||||
else if (flags & CONTEXT_SEGMENTS)
|
else if (flags & CONTEXT_SEGMENTS)
|
||||||
__wine_call_from_32_restore_regs( context );
|
__wine_restore_regs( context );
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CONTEXT newcontext = *context;
|
CONTEXT newcontext = *context;
|
||||||
|
@ -1181,7 +1181,7 @@ void set_cpu_context( const CONTEXT *context )
|
||||||
newcontext.SegEs = wine_get_es();
|
newcontext.SegEs = wine_get_es();
|
||||||
newcontext.SegFs = wine_get_fs();
|
newcontext.SegFs = wine_get_fs();
|
||||||
newcontext.SegGs = wine_get_gs();
|
newcontext.SegGs = wine_get_gs();
|
||||||
__wine_call_from_32_restore_regs( &newcontext );
|
__wine_restore_regs( &newcontext );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -752,7 +752,8 @@ static void BuildCallFrom32Regs(void)
|
||||||
|
|
||||||
/* Function header */
|
/* Function header */
|
||||||
|
|
||||||
function_header( "__wine_call_from_32_regs" );
|
output( "\t.text\n" );
|
||||||
|
function_header( "__wine_call_from_regs" );
|
||||||
|
|
||||||
/* Allocate some buffer space on the stack */
|
/* Allocate some buffer space on the stack */
|
||||||
|
|
||||||
|
@ -845,12 +846,12 @@ static void BuildCallFrom32Regs(void)
|
||||||
|
|
||||||
output( "\tpopl %%ds\n" );
|
output( "\tpopl %%ds\n" );
|
||||||
output( "\tiret\n" );
|
output( "\tiret\n" );
|
||||||
output_function_size( "__wine_call_from_32_regs" );
|
output_function_size( "__wine_call_from_regs" );
|
||||||
|
|
||||||
function_header( "__wine_call_from_32_restore_regs" );
|
function_header( "__wine_restore_regs" );
|
||||||
output( "\tmovl 4(%%esp),%%ecx\n" );
|
output( "\tmovl 4(%%esp),%%ecx\n" );
|
||||||
output( "\tjmp 2b\n" );
|
output( "\tjmp 2b\n" );
|
||||||
output_function_size( "__wine_call_from_32_restore_regs" );
|
output_function_size( "__wine_restore_regs" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -991,6 +992,7 @@ static void build_call_from_regs_x86_64(void)
|
||||||
|
|
||||||
/* Function header */
|
/* Function header */
|
||||||
|
|
||||||
|
output( "\t.text\n" );
|
||||||
function_header( "__wine_call_from_regs" );
|
function_header( "__wine_call_from_regs" );
|
||||||
|
|
||||||
output( "\t.cfi_startproc\n" );
|
output( "\t.cfi_startproc\n" );
|
||||||
|
@ -1170,7 +1172,6 @@ void BuildRelays32(void)
|
||||||
|
|
||||||
case CPU_x86_64:
|
case CPU_x86_64:
|
||||||
output( "/* File generated automatically. Do not edit! */\n\n" );
|
output( "/* File generated automatically. Do not edit! */\n\n" );
|
||||||
output( "\t.text\n" );
|
|
||||||
build_call_from_regs_x86_64();
|
build_call_from_regs_x86_64();
|
||||||
output_gnu_stack_note();
|
output_gnu_stack_note();
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue