Zebediah Figura : msvcrt: Avoid using inline assembly in continue_after_catch().

Alexandre Julliard julliard at winehq.org
Mon Jun 11 13:10:51 CDT 2018


Module: wine
Branch: master
Commit: 701e1b6f8126b88d68e01f6e34b2446a4a8c4854
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=701e1b6f8126b88d68e01f6e34b2446a4a8c4854

Author: Zebediah Figura <zfigura at codeweavers.com>
Date:   Mon Jun  4 17:23:32 2018 -0500

msvcrt: Avoid using inline assembly in continue_after_catch().

Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 )
 {




More information about the wine-cvs mailing list