include: Add MSVC ARM version of NtCurrentTeb.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2021-02-26 15:55:26 +01:00 committed by Alexandre Julliard
parent e3708c2c79
commit 4fdea7a7ca
1 changed files with 6 additions and 0 deletions

View File

@ -2815,6 +2815,12 @@ static FORCEINLINE struct _TEB * WINAPI NtCurrentTeb(void)
__asm__("mrc p15, 0, %0, c13, c0, 2" : "=r" (teb)); __asm__("mrc p15, 0, %0, c13, c0, 2" : "=r" (teb));
return teb; return teb;
} }
#elif defined(__arm__) && defined(_MSC_VER)
#pragma intrinsic(_MoveFromCoprocessor)
static FORCEINLINE struct _TEB * WINAPI NtCurrentTeb(void)
{
return (struct _TEB *)(ULONG_PTR)_MoveFromCoprocessor(15, 0, 13, 0, 2);
}
#else #else
extern struct _TEB * WINAPI NtCurrentTeb(void); extern struct _TEB * WINAPI NtCurrentTeb(void);
#endif #endif