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

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


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

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

msvcrt: Avoid using inline assembly in call_filter().

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 | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/dlls/msvcrt/except_i386.c b/dlls/msvcrt/except_i386.c
index 508e2ee..29540cd 100644
--- a/dlls/msvcrt/except_i386.c
+++ b/dlls/msvcrt/except_i386.c
@@ -187,15 +187,16 @@ __ASM_GLOBAL_FUNC( call_finally_block,
                    "movl 8(%esp), %ebp\n\t"
                    "jmp *4(%esp)" );
 
-static inline int call_filter( int (*func)(PEXCEPTION_POINTERS), void *arg, void *ebp )
-{
-    int ret;
-    __asm__ __volatile__ ("pushl %%ebp; pushl %3; movl %2,%%ebp; call *%%eax; popl %%ebp; popl %%ebp"
-                          : "=a" (ret)
-                          : "0" (func), "r" (ebp), "r" (arg)
-                          : "ecx", "edx", "memory" );
-    return ret;
-}
+extern int call_filter( int (*func)(PEXCEPTION_POINTERS), void *arg, void *ebp );
+
+__ASM_GLOBAL_FUNC( call_filter,
+                   "pushl %ebp\n\t"
+                   "pushl 12(%esp)\n\t"
+                   "movl 20(%esp), %ebp\n\t"
+                   "call *12(%esp)\n\t"
+                   "popl %ebp\n\t"
+                   "popl %ebp\n\t"
+                   "ret" );
 
 static inline int call_unwind_func( int (*func)(void), void *ebp )
 {




More information about the wine-cvs mailing list