Vitaliy Margolen : msvcrt: Preserve registers when calling unwind function.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jul 16 08:23:39 CDT 2007


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

Author: Vitaliy Margolen <wine-patches at kievinfo.com>
Date:   Sat Jul 14 23:45:02 2007 -0600

msvcrt: Preserve registers when calling unwind function.

---

 dlls/msvcrt/except.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/dlls/msvcrt/except.c b/dlls/msvcrt/except.c
index aef5133..9af5ff2 100644
--- a/dlls/msvcrt/except.c
+++ b/dlls/msvcrt/except.c
@@ -84,7 +84,16 @@ static inline int call_filter( int (*func)(PEXCEPTION_POINTERS), void *arg, void
 static inline int call_unwind_func( int (*func)(void), void *ebp )
 {
     int ret;
-    __asm__ __volatile__ ("pushl %%ebp; movl %2,%%ebp; call *%0; popl %%ebp"
+    __asm__ __volatile__ ("pushl %%ebp\n\t"
+                          "pushl %%ebx\n\t"
+                          "pushl %%esi\n\t"
+                          "pushl %%edi\n\t"
+                          "movl %2,%%ebp\n\t"
+                          "call *%0\n\t"
+                          "popl %%edi\n\t"
+                          "popl %%esi\n\t"
+                          "popl %%ebx\n\t"
+                          "popl %%ebp"
                           : "=a" (ret)
                           : "0" (func), "r" (ebp)
                           : "ecx", "edx", "memory" );




More information about the wine-cvs mailing list