Alexandre Julliard : ntoskrnl.exe: Add appropriate stdcall decorations to assembly functions.

Alexandre Julliard julliard at winehq.org
Mon Jun 15 07:59:04 CDT 2009


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Sun Jun 14 15:34:34 2009 +0200

ntoskrnl.exe: Add appropriate stdcall decorations to assembly functions.

---

 dlls/ntoskrnl.exe/ntoskrnl.c |   19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index 6371d85..714164e 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -66,18 +66,25 @@ struct IrpInstance
 
 #ifdef __i386__
 #define DEFINE_FASTCALL1_ENTRYPOINT( name ) \
-    __ASM_GLOBAL_FUNC( name, \
+    __ASM_STDCALL_FUNC( name, 4, \
                        "popl %eax\n\t" \
                        "pushl %ecx\n\t" \
                        "pushl %eax\n\t" \
-                       "jmp " __ASM_NAME("__regs_") #name )
+                       "jmp " __ASM_NAME("__regs_") #name __ASM_STDCALL(4))
 #define DEFINE_FASTCALL2_ENTRYPOINT( name ) \
-    __ASM_GLOBAL_FUNC( name, \
+    __ASM_STDCALL_FUNC( name, 8, \
                        "popl %eax\n\t" \
                        "pushl %edx\n\t" \
                        "pushl %ecx\n\t" \
                        "pushl %eax\n\t" \
-                       "jmp " __ASM_NAME("__regs_") #name )
+                       "jmp " __ASM_NAME("__regs_") #name __ASM_STDCALL(8))
+#define DEFINE_FASTCALL3_ENTRYPOINT( name ) \
+    __ASM_STDCALL_FUNC( name, 12, \
+                       "popl %eax\n\t" \
+                       "pushl %edx\n\t" \
+                       "pushl %ecx\n\t" \
+                       "pushl %eax\n\t" \
+                       "jmp " __ASM_NAME("__regs_") #name __ASM_STDCALL(12))
 #endif
 
 static inline LPCSTR debugstr_us( const UNICODE_STRING *us )
@@ -745,8 +752,8 @@ void WINAPI IofCompleteRequest( IRP *irp, UCHAR priority_boost )
 /***********************************************************************
  *           InterlockedCompareExchange   (NTOSKRNL.EXE.@)
  */
-#ifdef DEFINE_FASTCALL2_ENTRYPOINT
-DEFINE_FASTCALL2_ENTRYPOINT( NTOSKRNL_InterlockedCompareExchange )
+#ifdef DEFINE_FASTCALL3_ENTRYPOINT
+DEFINE_FASTCALL3_ENTRYPOINT( NTOSKRNL_InterlockedCompareExchange )
 LONG WINAPI __regs_NTOSKRNL_InterlockedCompareExchange( LONG volatile *dest, LONG xchg, LONG compare )
 #else
 LONG WINAPI NTOSKRNL_InterlockedCompareExchange( LONG volatile *dest, LONG xchg, LONG compare )




More information about the wine-cvs mailing list