Commit 6a05b84e authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

winnt.h: Provide inline NtCurrentTeb implementation for mingw arm builds.

Based on mingw-w64. Signed-off-by: 's avatarJacek Caban <jacek@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 0413e2a5
......@@ -2675,6 +2675,13 @@ static FORCEINLINE struct _TEB * WINAPI NtCurrentTeb(void)
{
return (struct _TEB *)__readgsqword(FIELD_OFFSET(NT_TIB, Self));
}
#elif defined(__arm__) && defined(__MINGW32__)
static FORCEINLINE struct _TEB * WINAPI NtCurrentTeb(void)
{
struct _TEB *teb;
__asm__("mrc p15, 0, %0, c13, c0, 2" : "=r" (teb));
return teb;
}
#else
extern struct _TEB * WINAPI NtCurrentTeb(void);
#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