Alexandre Julliard : winebuild: Use iretq on x86_64 to restore more system registers and flags.
Module: wine Branch: master Commit: 880d00fb43de924a3543b0ad53b5aaf0ad63d0cb URL: http://source.winehq.org/git/wine.git/?a=commit;h=880d00fb43de924a3543b0ad53... Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri May 1 18:03:23 2009 +0200 winebuild: Use iretq on x86_64 to restore more system registers and flags. --- tools/winebuild/relay.c | 24 +++++++++++------------- 1 files changed, 11 insertions(+), 13 deletions(-) diff --git a/tools/winebuild/relay.c b/tools/winebuild/relay.c index 50b47d9..ddc8051 100644 --- a/tools/winebuild/relay.c +++ b/tools/winebuild/relay.c @@ -1111,19 +1111,17 @@ static void build_call_from_regs_x86_64(void) output( "\tfxrstor 0x100(%%rbx)\n" ); output( "\tldmxcsr 0x34(%%rbx)\n" ); - output( "\tmovl 0x44(%%rbx),%%eax\n" ); - output( "\tpushq %%rax\n" ); - output( "\tpopfq\n" ); - - output( "\tmovq 0x98(%%rbx),%%rax\n" ); /* stack pointer */ - output( "\tpushq 0xf8(%%rbx)\n" ); /* return address */ - output( "\tpopq -8(%%rax)\n" ); - output( "\tpushq 0x78(%%rbx)\n" ); /* rax */ - output( "\tpopq -16(%%rax)\n" ); - output( "\tmovq 0x90(%%rbx),%%rbx\n" ); - output( "\tleaq -16(%%rax),%%rsp\n" ); - output( "\tpopq %%rax\n" ); - output( "\tret\n" ); + output( "\tmovq 0xf8(%%rbx),%%rax\n" ); /* rip */ + output( "\tmovq %%rax,0(%%rsp)\n" ); + output( "\tmovw 0x38(%%rbx),%%ax\n" ); /* cs */ + output( "\tmovq %%rax,0x8(%%rsp)\n" ); + output( "\tmovl 0x44(%%rbx),%%eax\n" ); /* flags */ + output( "\tmovq %%rax,0x10(%%rsp)\n" ); + output( "\tmovq 0x98(%%rbx),%%rax\n" ); /* rsp */ + output( "\tmovq %%rax,0x18(%%rsp)\n" ); + output( "\tmovw 0x42(%%rbx),%%ax\n" ); /* ss */ + output( "\tmovq %%rax,0x20(%%rsp)\n" ); + output( "\tiretq\n" ); output_function_size( "__wine_call_from_regs" );
participants (1)
-
Alexandre Julliard