Author: tkreuzer Date: Sat Apr 5 16:56:00 2014 New Revision: 62630
URL: http://svn.reactos.org/svn/reactos?rev=62630&view=rev Log: [PSEH3] Make sure _abnormal_termination() returns the correct result and make sure the compiler does not rely on register values in the finally and filter function. The C++ PSEH tests now all pass. => We now have PSEH support for C++.
Modified: trunk/reactos/include/reactos/libs/pseh/pseh3.h
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] Sat Apr 5 16:56:00 2014 @@ -230,17 +230,19 @@ #define _SEH3$_NESTED_FUNC_RETURN(_Result) \ /* Restore esp and return to the caller */ \ asm volatile ("movl %[FixedEsp], %%esp\nret\n" \ - : : "a"(_Result), [FixedEsp]"m"(_SEH3$_TrylevelFrame.AllocaFrame) : "memory") + : : "a"(_Result), [FixedEsp]"m"(_SEH3$_TrylevelFrame.AllocaFrame) : "ebx", "ecx", "edx", "esi", "edi", "flags", "memory")
/* The filter "function" */ #define _SEH3$_DEFINE_FILTER_FUNC(_Name, expression) \ { \ /* Evaluate and return the filter expression */ \ + asm volatile ("#\n" : : : "eax", "ebx", "ecx", "edx", "esi", "edi", "flags", "memory"); \ _SEH3$_NESTED_FUNC_RETURN((expression)); \ }
#define _SEH3$_FINALLY_FUNC_OPEN(_Name) \ { \ + asm volatile ("#\n" : : : "eax", "ebx", "ecx", "edx", "esi", "edi", "flags", "memory"); \ /* This construct makes sure that the finally function returns */ \ /* a proper value at the end */ \ for (; ; (void)({_SEH3$_NESTED_FUNC_RETURN(0); 0;})) @@ -429,6 +431,7 @@ /* Register the registration record. */ \ if (_SEH3$_TryLevel == 1) _SEH3$_RegisterFrame_(&_SEH3$_TrylevelFrame, &_SEH3$_ScopeTable); \ else _SEH3$_RegisterTryLevel_(&_SEH3$_TrylevelFrame, &_SEH3$_ScopeTable); \ + _SEH3$_TrylevelFrame.ExceptionPointers = (PSEH3$_EXCEPTION_POINTERS)1; \ \ goto _SEH3$_l_DoTry; \ \