Commit 770e15ee authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

include: Add support for NtCurrentTeb and PSDK compiler in 64-bit mode.

parent c3dd56c9
...@@ -2335,6 +2335,12 @@ static FORCEINLINE struct _TEB * WINAPI NtCurrentTeb(void) ...@@ -2335,6 +2335,12 @@ static FORCEINLINE struct _TEB * WINAPI NtCurrentTeb(void)
__asm__(".byte 0x65\n\tmovq (0x30),%0" : "=r" (teb)); __asm__(".byte 0x65\n\tmovq (0x30),%0" : "=r" (teb));
return teb; return teb;
} }
#elif defined(__x86_64__) && defined(_MSC_VER)
#pragma intrinsic(__readgsqword)
static FORCEINLINE struct _TEB * WINAPI NtCurrentTeb(void)
{
return (struct _TEB *)__readgsqword(FIELD_OFFSET(NT_TIB, Self));
}
#else #else
extern struct _TEB * WINAPI NtCurrentTeb(void); extern struct _TEB * WINAPI NtCurrentTeb(void);
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment