[PATCH 1/5] msvcrt: Avoid using inline assembly in continue_after_catch().

Zebediah Figura zfigura at codeweavers.com
Mon Jun 4 17:23:32 CDT 2018


Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
---
 dlls/msvcrt/except_i386.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/dlls/msvcrt/except_i386.c b/dlls/msvcrt/except_i386.c
index ee12fb6..2c845b2 100644
--- a/dlls/msvcrt/except_i386.c
+++ b/dlls/msvcrt/except_i386.c
@@ -172,12 +172,14 @@ __ASM_GLOBAL_FUNC( call_copy_ctor,
                    "ret" );
 
 /* continue execution to the specified address after exception is caught */
-static inline void DECLSPEC_NORETURN continue_after_catch( cxx_exception_frame* frame, void *addr )
-{
-    __asm__ __volatile__("movl -4(%0),%%esp; leal 12(%0),%%ebp; jmp *%1"
-                         : : "r" (frame), "a" (addr) );
-    for (;;) ; /* unreached */
-}
+extern void DECLSPEC_NORETURN continue_after_catch( cxx_exception_frame* frame, void *addr );
+
+__ASM_GLOBAL_FUNC( continue_after_catch,
+                   "movl 4(%esp), %edx\n\t"
+                   "movl 8(%esp), %eax\n\t"
+                   "movl -4(%edx), %esp\n\t"
+                   "leal 12(%edx), %ebp\n\t"
+                   "jmp *%eax" );
 
 static inline void call_finally_block( void *code_block, void *base_ptr )
 {
-- 
2.7.4




More information about the wine-devel mailing list