Dmitry Timoshkov : include: Add support for NtCurrentTeb and PSDK compiler in 64-bit mode.
Module: wine Branch: master Commit: 770e15eef1aee5f9cf0096be92c3d95623b260aa URL: http://source.winehq.org/git/wine.git/?a=commit;h=770e15eef1aee5f9cf0096be92... Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Mon Jul 13 14:17:10 2015 +0800 include: Add support for NtCurrentTeb and PSDK compiler in 64-bit mode. --- include/winnt.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/winnt.h b/include/winnt.h index 68a33f3..a1116bd 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -2335,6 +2335,12 @@ static FORCEINLINE struct _TEB * WINAPI NtCurrentTeb(void) __asm__(".byte 0x65\n\tmovq (0x30),%0" : "=r" (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 extern struct _TEB * WINAPI NtCurrentTeb(void); #endif
participants (1)
-
Alexandre Julliard