Module: wine Branch: master Commit: dc80a0032927421d61b95659af570c21439e4a76 URL: https://source.winehq.org/git/wine.git/?a=commit;h=dc80a0032927421d61b95659a...
Author: Alexandre Julliard julliard@winehq.org Date: Wed Jan 2 17:24:48 2019 +0100
ntdll: Also store FPU registers in RtlRaiseException().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44485 Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/ntdll/signal_i386.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c index 0719c64..91ecfa7 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c @@ -2499,6 +2499,19 @@ NTSTATUS WINAPI NtRaiseException( EXCEPTION_RECORD *rec, CONTEXT *context, BOOL }
+/******************************************************************* + * raise_exception_full_context + * + * Raise an exception with the full CPU context. + */ +void raise_exception_full_context( EXCEPTION_RECORD *rec, CONTEXT *context, BOOL first_chance ) +{ + save_fpu( context ); + /* FIXME: extended registers, debug registers */ + RtlRaiseStatus( NtRaiseException( rec, context, first_chance )); +} + + /*********************************************************************** * RtlRaiseException (NTDLL.@) */ @@ -2520,9 +2533,7 @@ __ASM_STDCALL_FUNC( RtlRaiseException, 4, "pushl $1\n\t" "pushl %eax\n\t" "pushl %ecx\n\t" - "call " __ASM_NAME("NtRaiseException") __ASM_STDCALL(12) "\n\t" - "pushl %eax\n\t" - "call " __ASM_NAME("RtlRaiseStatus") __ASM_STDCALL(4) "\n\t" + "call " __ASM_NAME("raise_exception_full_context") "\n\t" "leave\n\t" __ASM_CFI(".cfi_def_cfa %esp,4\n\t") __ASM_CFI(".cfi_same_value %ebp\n\t")