[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    [PATCH 1/2] msvcrt: Avoid using inline assembly in __ExceptionPtrDestroy().
From:       Zebediah Figura <zfigura () codeweavers ! com>
Date:       2018-05-31 22:13:49
Message-ID: 1527804830-22049-1-git-send-email-zfigura () codeweavers ! com
[Download RAW message or body]

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
---
 dlls/msvcrt/cpp.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/dlls/msvcrt/cpp.c b/dlls/msvcrt/cpp.c
index 07cde75..3402d13 100644
--- a/dlls/msvcrt/cpp.c
+++ b/dlls/msvcrt/cpp.c
@@ -1718,10 +1718,12 @@ void __cdecl __ExceptionPtrCreate(exception_ptr *ep)
 }
 
 #ifdef __i386__
-static inline void call_dtor(const cxx_exception_type *type, void *func, void *object)
-{
-    __asm__ __volatile__("call *%0" : : "m" (func), "c" (object) : "eax", "edx", "memory");
-}
+extern void call_dtor(const cxx_exception_type *type, void *func, void *object);
+
+__ASM_GLOBAL_FUNC( call_dtor,
+                   "movl 12(%esp),%ecx\n\t"
+                   "call *8(%esp)\n\t"
+                   "ret" );
 #elif __x86_64__
 static inline void call_dtor(const cxx_exception_type *type, unsigned int dtor, void *object)
 {
-- 
2.7.4




[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic