[PATCH 1/2] msvcrt: Avoid using inline assembly in __ExceptionPtrDestroy().

Zebediah Figura zfigura at codeweavers.com
Thu May 31 17:13:49 CDT 2018


Signed-off-by: Zebediah Figura <zfigura at 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




More information about the wine-devel mailing list