mirror of
https://github.com/reactos/reactos.git
synced 2025-06-03 16:30:26 +00:00
[PSEH]
- Fix compilation of PSEH with Clang - Fix _SEH3$_InvokeEmbeddedFilterFromRegistration svn path=/trunk/; revision=64077
This commit is contained in:
parent
e9389a03f4
commit
cc9ee2cf1b
3 changed files with 11 additions and 7 deletions
|
@ -64,7 +64,7 @@ typedef struct _SEH3$_REGISTRATION_FRAME
|
||||||
/* Except handler stores pointer to exception pointers here */
|
/* Except handler stores pointer to exception pointers here */
|
||||||
PSEH3$_EXCEPTION_POINTERS volatile ExceptionPointers;
|
PSEH3$_EXCEPTION_POINTERS volatile ExceptionPointers;
|
||||||
|
|
||||||
/* Except handle stores the exception code here */
|
/* Except handler stores the exception code here */
|
||||||
unsigned long ExceptionCode;
|
unsigned long ExceptionCode;
|
||||||
|
|
||||||
/* Registers that we need to save */
|
/* Registers that we need to save */
|
||||||
|
|
|
@ -64,7 +64,7 @@ _SEH3$_Unregister(
|
||||||
static inline
|
static inline
|
||||||
LONG
|
LONG
|
||||||
_SEH3$_InvokeNestedFunctionFilter(
|
_SEH3$_InvokeNestedFunctionFilter(
|
||||||
PSEH3$_REGISTRATION_FRAME RegistrationFrame,
|
volatile SEH3$_REGISTRATION_FRAME *RegistrationFrame,
|
||||||
PVOID Filter)
|
PVOID Filter)
|
||||||
{
|
{
|
||||||
LONG FilterResult;
|
LONG FilterResult;
|
||||||
|
@ -93,17 +93,17 @@ _SEH3$_InvokeNestedFunctionFilter(
|
||||||
long
|
long
|
||||||
__attribute__((regparm(1)))
|
__attribute__((regparm(1)))
|
||||||
_SEH3$_InvokeEmbeddedFilter(
|
_SEH3$_InvokeEmbeddedFilter(
|
||||||
PSEH3$_REGISTRATION_FRAME RegistrationFrame);
|
volatile SEH3$_REGISTRATION_FRAME *RegistrationFrame);
|
||||||
|
|
||||||
long
|
long
|
||||||
__attribute__((regparm(1)))
|
__attribute__((regparm(1)))
|
||||||
_SEH3$_InvokeEmbeddedFilterFromRegistration(
|
_SEH3$_InvokeEmbeddedFilterFromRegistration(
|
||||||
PSEH3$_REGISTRATION_FRAME RegistrationFrame);
|
volatile SEH3$_REGISTRATION_FRAME *RegistrationFrame);
|
||||||
|
|
||||||
static inline
|
static inline
|
||||||
LONG
|
LONG
|
||||||
_SEH3$_InvokeFilter(
|
_SEH3$_InvokeFilter(
|
||||||
PSEH3$_REGISTRATION_FRAME RegistrationFrame,
|
volatile SEH3$_REGISTRATION_FRAME *RegistrationFrame,
|
||||||
PVOID Filter)
|
PVOID Filter)
|
||||||
{
|
{
|
||||||
LONG FilterResult;
|
LONG FilterResult;
|
||||||
|
@ -133,7 +133,7 @@ _SEH3$_InvokeFilter(
|
||||||
void
|
void
|
||||||
__attribute__((regparm(1)))
|
__attribute__((regparm(1)))
|
||||||
_SEH3$_AutoCleanup(
|
_SEH3$_AutoCleanup(
|
||||||
SEH3$_REGISTRATION_FRAME *Frame)
|
volatile SEH3$_REGISTRATION_FRAME *Frame)
|
||||||
{
|
{
|
||||||
/* Check for __finally frames */
|
/* Check for __finally frames */
|
||||||
if (Frame->ScopeTable->Target == NULL)
|
if (Frame->ScopeTable->Target == NULL)
|
||||||
|
@ -241,7 +241,9 @@ _SEH3$_CallRtlUnwind(
|
||||||
|
|
||||||
EXCEPTION_DISPOSITION
|
EXCEPTION_DISPOSITION
|
||||||
__cdecl
|
__cdecl
|
||||||
|
#ifndef __clang__
|
||||||
__attribute__ ((__target__ ("cld")))
|
__attribute__ ((__target__ ("cld")))
|
||||||
|
#endif
|
||||||
_SEH3$_except_handler(
|
_SEH3$_except_handler(
|
||||||
struct _EXCEPTION_RECORD * ExceptionRecord,
|
struct _EXCEPTION_RECORD * ExceptionRecord,
|
||||||
PSEH3$_REGISTRATION_FRAME EstablisherFrame,
|
PSEH3$_REGISTRATION_FRAME EstablisherFrame,
|
||||||
|
|
|
@ -128,6 +128,8 @@ __SEH3$_InvokeEmbeddedFilterFromRegistration:
|
||||||
mov edi, [eax + SEH3_REGISTRATION_FRAME_Edi]
|
mov edi, [eax + SEH3_REGISTRATION_FRAME_Edi]
|
||||||
mov ebp, [eax + SEH3_REGISTRATION_FRAME_Ebp]
|
mov ebp, [eax + SEH3_REGISTRATION_FRAME_Ebp]
|
||||||
|
|
||||||
|
jmp __SEH3$_InvokeEmbeddedFilter2
|
||||||
|
|
||||||
/* Get the saved stack pointer */
|
/* Get the saved stack pointer */
|
||||||
mov edx, [eax + SEH3_REGISTRATION_FRAME_Esp]
|
mov edx, [eax + SEH3_REGISTRATION_FRAME_Esp]
|
||||||
|
|
||||||
|
@ -155,7 +157,7 @@ __SEH3$_InvokeEmbeddedFilter:
|
||||||
|
|
||||||
/* Load ebp from the registration invocation */
|
/* Load ebp from the registration invocation */
|
||||||
mov ebp, [eax + SEH3_REGISTRATION_FRAME_Ebp]
|
mov ebp, [eax + SEH3_REGISTRATION_FRAME_Ebp]
|
||||||
|
__SEH3$_InvokeEmbeddedFilter2:
|
||||||
/* Calculate the size of the temp stack frame region */
|
/* Calculate the size of the temp stack frame region */
|
||||||
mov ecx, [eax + SEH3_REGISTRATION_FRAME_AllocaFrame]
|
mov ecx, [eax + SEH3_REGISTRATION_FRAME_AllocaFrame]
|
||||||
sub ecx, [eax + SEH3_REGISTRATION_FRAME_Esp]
|
sub ecx, [eax + SEH3_REGISTRATION_FRAME_Esp]
|
||||||
|
|
Loading…
Reference in a new issue