[MSVCRT] Fix export of __uncaught_exception
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Sat, 10 May 2014 14:16:11 +0000 (14:16 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Sat, 10 May 2014 14:16:11 +0000 (14:16 +0000)
[MSHTML] Add x64 asm wrappers

svn path=/trunk/; revision=63219

reactos/dll/win32/mshtml/msvc.S
reactos/dll/win32/msvcrt/msvcrt.spec

index 9d210be..90b65d8 100644 (file)
@@ -4,13 +4,23 @@
 .code
 
 MACRO(DEFINE_WRAPPER_FUNC, n, off, x)
+#ifdef _M_IX86
 PUBLIC _wrapper_func_&n&
 _wrapper_func_&n&:
-mov eax, [esp+4]
-mov eax, [eax+4]
-mov [esp+4], eax
-mov eax, [eax]
-jmp dword ptr [eax+off]
+    mov eax, [esp+4]
+    mov eax, [eax+4]
+    mov [esp+4], eax
+    mov eax, [eax]
+    jmp dword ptr [eax+off]
+#elif defined(_M_AMD64)
+PUBLIC wrapper_func_&n&
+wrapper_func_&n&:
+    mov rcx, [rcx+4]
+    mov rax, [rcx]
+    jmp qword ptr [rax+off]
+#else
+#error Unimplemented
+#endif
 ENDM
 
 DEFINE_WRAPPER_FUNC 3, 12, 24
index 1e5e067..8587c0d 100644 (file)
@@ -73,7 +73,7 @@
 # @ cdecl ??_U@YAPAXIHPBDH@Z(long long str long) MSVCRT_operator_new_dbg
 @ cdecl -arch=win32 ??_V@YAXPAX@Z(ptr) MSVCRT_operator_delete
 @ cdecl -arch=win64 ??_V@YAXPEAX@Z(ptr) MSVCRT_operator_delete
-@ cdecl -arch=win64 -norelay __uncaught_exception(ptr)
+@ cdecl -norelay __uncaught_exception(ptr)
 @ cdecl -arch=win32 -norelay ?_query_new_handler@@YAP6AHI@ZXZ() MSVCRT__query_new_handler
 @ cdecl -arch=win64 -norelay ?_query_new_handler@@YAP6AH_K@ZXZ() MSVCRT__query_new_handler
 @ cdecl ?_query_new_mode@@YAHXZ() MSVCRT__query_new_mode
 @ cdecl __threadhandle() kernel32.GetCurrentThread
 @ cdecl __threadid() kernel32.GetCurrentThreadId
 @ cdecl __toascii(long)
-@ cdecl __uncaught_exception()
 @ cdecl __unDName(ptr str long ptr ptr long)
 @ cdecl __unDNameEx(ptr str long ptr ptr ptr long)
 @ extern __unguarded_readlc_active