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

Based on mingw-w64.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
feature/deterministic
Jacek Caban 2020-05-27 20:19:04 +02:00 committed by Alexandre Julliard
parent 0413e2a523
commit 6a05b84eca
1 changed files with 7 additions and 0 deletions

View File

@ -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