From 7d4a8b9e1ca2c67c779683bb06a9cf3b01c3c8ff Mon Sep 17 00:00:00 2001 From: "KJK::Hyperion" Date: Sun, 23 Nov 2008 00:20:37 +0000 Subject: [PATCH] modified include/reactos/libs/pseh/pseh2.h Make SF_FramePointer field of _SEHFrame_t volatile, too, just to be safe Unoptimized compilation doesn't perform const-folding - "static const" could result in compilation errors, use just "const" Renamed _SEH2_GetExceptionPointers to _SEH2_GetExceptionInformation to be closer to the "standard" SEH syntax modified lib/pseh/framebased-gcchack.c Clobber the register that's actually used svn path=/trunk/; revision=37570 --- reactos/include/reactos/libs/pseh/pseh2.h | 6 +++--- reactos/lib/pseh/framebased-gcchack.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/reactos/include/reactos/libs/pseh/pseh2.h b/reactos/include/reactos/libs/pseh/pseh2.h index 40288853a5e..f007b409401 100644 --- a/reactos/include/reactos/libs/pseh/pseh2.h +++ b/reactos/include/reactos/libs/pseh/pseh2.h @@ -122,7 +122,7 @@ typedef struct __SEHFrame { _SEHRegistration_t SF_Registration; volatile struct __SEHTryLevel * volatile SF_TopTryLevel; - void * SF_FramePointer; + void * volatile SF_FramePointer; void * volatile SF_StackPointer; volatile unsigned long SF_Code; } @@ -176,7 +176,7 @@ _SEHTryLevel_t; \ _SEHBeginScope: __SEH_SIDE_EFFECT; \ \ - static const int _SEHTopTryLevel = (_SEHScopeKind != 0); \ + const int _SEHTopTryLevel = (_SEHScopeKind != 0); \ _SEHFrame_t * const _SEHCurFrameP = _SEHFrameP; \ volatile _SEHTryLevel_t * const _SEHPrevTryLevelP = _SEHTryLevelP; \ \ @@ -342,7 +342,7 @@ _SEHTryLevel_t; } \ __SEH_END_SCOPE; -#define _SEH2_GetExceptionPointers() ((struct _EXCEPTION_POINTERS *)_SEHExceptionPointers) +#define _SEH2_GetExceptionInformation() ((struct _EXCEPTION_POINTERS *)_SEHExceptionPointers) #define _SEH2_GetExceptionCode() ((_SEHFrameP)->SF_Code) #define _SEH2_YIELD(STMT_) \ diff --git a/reactos/lib/pseh/framebased-gcchack.c b/reactos/lib/pseh/framebased-gcchack.c index 0294113e39c..0ef61d07eb5 100644 --- a/reactos/lib/pseh/framebased-gcchack.c +++ b/reactos/lib/pseh/framebased-gcchack.c @@ -154,7 +154,7 @@ void __cdecl _SEH2LeaveFrame() "movl %%edx, %%fs:0\n" : : : - "ecx" + "edx" ); }