Alexandre Julliard : msvcrt: Preserve all registers in call_ebp_func.

Alexandre Julliard julliard at wine.codeweavers.com
Sat Jan 21 12:29:39 CST 2006


Module: wine
Branch: refs/heads/master
Commit: c0165091191becde9b04ba9c9a6ddad6d3daa4f4
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=c0165091191becde9b04ba9c9a6ddad6d3daa4f4

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Sat Jan 21 19:23:02 2006 +0100

msvcrt: Preserve all registers in call_ebp_func.

---

 dlls/msvcrt/cppexcept.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/dlls/msvcrt/cppexcept.c b/dlls/msvcrt/cppexcept.c
index 425a384..29d7b58 100644
--- a/dlls/msvcrt/cppexcept.c
+++ b/dlls/msvcrt/cppexcept.c
@@ -52,8 +52,15 @@ DWORD cxx_frame_handler( PEXCEPTION_RECO
 inline static void *call_ebp_func( void *func, void *ebp )
 {
     void *ret;
-    __asm__ __volatile__ ("pushl %%ebp; movl %2,%%ebp; call *%%eax; popl %%ebp" \
-                          : "=a" (ret) : "0" (func), "r" (ebp) : "ecx", "edx", "memory" );
+    int dummy;
+    __asm__ __volatile__ ("pushl %%ebx\n\t"
+                          "pushl %%ebp\n\t"
+                          "movl %4,%%ebp\n\t"
+                          "call *%%eax\n\t"
+                          "popl %%ebp\n\t"
+                          "popl %%ebx"
+                          : "=a" (ret), "=S" (dummy), "=D" (dummy)
+                          : "0" (func), "1" (ebp) : "ecx", "edx", "memory" );
     return ret;
 }
 




More information about the wine-cvs mailing list