Author: tkreuzer Date: Sun Sep 7 20:52:20 2014 New Revision: 64077
URL: http://svn.reactos.org/svn/reactos?rev=64077&view=rev Log: [PSEH] - Fix compilation of PSEH with Clang - Fix _SEH3$_InvokeEmbeddedFilterFromRegistration
Modified: trunk/reactos/include/reactos/libs/pseh/pseh3.h trunk/reactos/lib/pseh/i386/pseh3.c trunk/reactos/lib/pseh/i386/pseh3_i386.S
Modified: trunk/reactos/include/reactos/libs/pseh/pseh3.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/libs/pseh/p... ============================================================================== --- trunk/reactos/include/reactos/libs/pseh/pseh3.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/libs/pseh/pseh3.h [iso-8859-1] Sun Sep 7 20:52:20 2014 @@ -64,7 +64,7 @@ /* Except handler stores pointer to exception pointers here */ PSEH3$_EXCEPTION_POINTERS volatile ExceptionPointers;
- /* Except handle stores the exception code here */ + /* Except handler stores the exception code here */ unsigned long ExceptionCode;
/* Registers that we need to save */
Modified: trunk/reactos/lib/pseh/i386/pseh3.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/pseh/i386/pseh3.c?rev=6... ============================================================================== --- trunk/reactos/lib/pseh/i386/pseh3.c [iso-8859-1] (original) +++ trunk/reactos/lib/pseh/i386/pseh3.c [iso-8859-1] Sun Sep 7 20:52:20 2014 @@ -64,7 +64,7 @@ static inline LONG _SEH3$_InvokeNestedFunctionFilter( - PSEH3$_REGISTRATION_FRAME RegistrationFrame, + volatile SEH3$_REGISTRATION_FRAME *RegistrationFrame, PVOID Filter) { LONG FilterResult; @@ -93,17 +93,17 @@ long __attribute__((regparm(1))) _SEH3$_InvokeEmbeddedFilter( - PSEH3$_REGISTRATION_FRAME RegistrationFrame); + volatile SEH3$_REGISTRATION_FRAME *RegistrationFrame);
long __attribute__((regparm(1))) _SEH3$_InvokeEmbeddedFilterFromRegistration( - PSEH3$_REGISTRATION_FRAME RegistrationFrame); + volatile SEH3$_REGISTRATION_FRAME *RegistrationFrame);
static inline LONG _SEH3$_InvokeFilter( - PSEH3$_REGISTRATION_FRAME RegistrationFrame, + volatile SEH3$_REGISTRATION_FRAME *RegistrationFrame, PVOID Filter) { LONG FilterResult; @@ -133,7 +133,7 @@ void __attribute__((regparm(1))) _SEH3$_AutoCleanup( - SEH3$_REGISTRATION_FRAME *Frame) + volatile SEH3$_REGISTRATION_FRAME *Frame) { /* Check for __finally frames */ if (Frame->ScopeTable->Target == NULL) @@ -241,7 +241,9 @@
EXCEPTION_DISPOSITION __cdecl +#ifndef __clang__ __attribute__ ((__target__ ("cld"))) +#endif _SEH3$_except_handler( struct _EXCEPTION_RECORD * ExceptionRecord, PSEH3$_REGISTRATION_FRAME EstablisherFrame,
Modified: trunk/reactos/lib/pseh/i386/pseh3_i386.S URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/pseh/i386/pseh3_i386.S?... ============================================================================== --- trunk/reactos/lib/pseh/i386/pseh3_i386.S [iso-8859-1] (original) +++ trunk/reactos/lib/pseh/i386/pseh3_i386.S [iso-8859-1] Sun Sep 7 20:52:20 2014 @@ -128,6 +128,8 @@ mov edi, [eax + SEH3_REGISTRATION_FRAME_Edi] mov ebp, [eax + SEH3_REGISTRATION_FRAME_Ebp]
+ jmp __SEH3$_InvokeEmbeddedFilter2 + /* Get the saved stack pointer */ mov edx, [eax + SEH3_REGISTRATION_FRAME_Esp]
@@ -155,7 +157,7 @@
/* Load ebp from the registration invocation */ mov ebp, [eax + SEH3_REGISTRATION_FRAME_Ebp] - +__SEH3$_InvokeEmbeddedFilter2: /* Calculate the size of the temp stack frame region */ mov ecx, [eax + SEH3_REGISTRATION_FRAME_AllocaFrame] sub ecx, [eax + SEH3_REGISTRATION_FRAME_Esp]