Module: wine Branch: master Commit: 9666ed9c466d803eec868e5db1d63c10b614d4c2 URL: https://source.winehq.org/git/wine.git/?a=commit;h=9666ed9c466d803eec868e5db...
Author: Jacek Caban jacek@codeweavers.com Date: Tue May 5 16:28:56 2020 +0200
winecrt0: Build exception functions on clang msvc target.
We may potentially use compiler __try/__except support in this case, but there is no reason not to support both.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/winecrt0/exception.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/dlls/winecrt0/exception.c b/dlls/winecrt0/exception.c index 3a0ecfef68..137ee2d6ee 100644 --- a/dlls/winecrt0/exception.c +++ b/dlls/winecrt0/exception.c @@ -23,7 +23,9 @@ #include "wine/exception.h" #include "wine/asm.h"
-#if defined(__GNUC__) && defined(__i386__) +#if defined(__GNUC__) || defined(__clang__) + +#if defined(__i386__)
__ASM_GLOBAL_FUNC( __wine_setjmpex, "movl 4(%esp),%ecx\n\t" /* jmp_buf */ @@ -62,7 +64,7 @@ __ASM_GLOBAL_FUNC( __wine_rtl_unwind, "call " __ASM_STDCALL("RtlUnwind",16) "\n\t" "call *16(%ebp)" )
-#elif defined(__GNUC__) && defined(__x86_64__) +#elif defined(__x86_64__)
__ASM_GLOBAL_FUNC( __wine_setjmpex, "movq %rdx,(%rcx)\n\t" /* jmp_buf->Frame */ @@ -134,7 +136,7 @@ __ASM_GLOBAL_FUNC( __wine_rtl_unwind, /* we need an extra call to make sure the stack is correctly aligned */ "callq *%rax" )
-#elif defined(__GNUC__) && defined(__arm__) +#elif defined(__arm__)
__ASM_GLOBAL_FUNC( __wine_setjmpex, "str r1, [r0]\n\t" /* jmp_buf->Frame */ @@ -196,7 +198,7 @@ void __cdecl __wine_rtl_unwind( EXCEPTION_REGISTRATION_RECORD* frame, EXCEPTION_ for (;;) target(); }
-#elif defined(__GNUC__) && defined(__aarch64__) +#elif defined(__aarch64__)
__ASM_GLOBAL_FUNC( __wine_setjmpex, "str x1, [x0]\n\t" /* jmp_buf->Frame */ @@ -383,3 +385,5 @@ DWORD __cdecl __wine_finally_ctx_handler( EXCEPTION_RECORD *record, } return ExceptionContinueSearch; } + +#endif /* __GNUC__ || __clang__ */