Module: wine Branch: master Commit: 383879f6866005689ade46ed2ce003ebe7e13fbe URL: http://source.winehq.org/git/wine.git/?a=commit;h=383879f6866005689ade46ed2c...
Author: Alexandre Julliard julliard@winehq.org Date: Fri May 7 14:15:25 2010 +0200
kernel32: Add an x86_64 implementation for the TEB access functions.
---
dlls/kernel32/thread.c | 34 +++++++++++++++++++++++++++++++++- 1 files changed, 33 insertions(+), 1 deletions(-)
diff --git a/dlls/kernel32/thread.c b/dlls/kernel32/thread.c index 5130286..024e825 100644 --- a/dlls/kernel32/thread.c +++ b/dlls/kernel32/thread.c @@ -602,7 +602,39 @@ __ASM_STDCALL_FUNC( GetCurrentThreadId, 0, ".byte 0x64\n\tmovl 0x24,%eax\n\tret" /* HANDLE WINAPI GetProcessHeap(void) */ __ASM_STDCALL_FUNC( GetProcessHeap, 0, ".byte 0x64\n\tmovl 0x30,%eax\n\tmovl 0x18(%eax),%eax\n\tret");
-#else /* __i386__ */ +#elif defined(__x86_64__) + +/*********************************************************************** + * SetLastError (KERNEL32.@) + */ +/* void WINAPI SetLastError( DWORD error ); */ +__ASM_STDCALL_FUNC( SetLastError, 8, ".byte 0x65\n\tmovl %ecx,0x68\n\tret" ); + +/*********************************************************************** + * GetLastError (KERNEL32.@) + */ +/* DWORD WINAPI GetLastError(void); */ +__ASM_STDCALL_FUNC( GetLastError, 0, ".byte 0x65\n\tmovl 0x68,%eax\n\tret" ); + +/*********************************************************************** + * GetCurrentProcessId (KERNEL32.@) + */ +/* DWORD WINAPI GetCurrentProcessId(void) */ +__ASM_STDCALL_FUNC( GetCurrentProcessId, 0, ".byte 0x65\n\tmovl 0x40,%eax\n\tret" ); + +/*********************************************************************** + * GetCurrentThreadId (KERNEL32.@) + */ +/* DWORD WINAPI GetCurrentThreadId(void) */ +__ASM_STDCALL_FUNC( GetCurrentThreadId, 0, ".byte 0x65\n\tmovl 0x48,%eax\n\tret" ); + +/*********************************************************************** + * GetProcessHeap (KERNEL32.@) + */ +/* HANDLE WINAPI GetProcessHeap(void) */ +__ASM_STDCALL_FUNC( GetProcessHeap, 0, ".byte 0x65\n\tmovq 0x60,%rax\n\tmovq 0x30(%rax),%rax\n\tret"); + +#else /* __x86_64__ */
/********************************************************************** * SetLastError (KERNEL32.@)