We pushed the flags, but kept them set. Far Cry sets NT flags, which causes later iretd instruction to raise a GP fault exception.
This fixes a regression from e341d1f695311725752c287057f6c6ab60fdf2a3.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50793 Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- tools/winebuild/import.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c index b745f16db42..ad773e2a0d9 100644 --- a/tools/winebuild/import.c +++ b/tools/winebuild/import.c @@ -1447,6 +1447,8 @@ static void output_syscall_dispatcher( int count, const char *variant ) output( "\tmovl %%esi,-0x04(%%ebp)\n" ); output_cfi( ".cfi_rel_offset %%esi,-0x04\n" ); output( "\tpushfl\n" ); + output( "\tpushl $0x202\n" ); + output( "\tpopfl\n" ); output( "\tmovw %%gs,-0x1a(%%ebp)\n" ); output( "\tmovw %%fs,-0x1c(%%ebp)\n" ); output( "\tmovw %%es,-0x1e(%%ebp)\n" );