Module: wine Branch: master Commit: 4fdea7a7cab3283e7d2eec7538f5da0493c1d68d URL: https://source.winehq.org/git/wine.git/?a=commit;h=4fdea7a7cab3283e7d2eec753...
Author: Jacek Caban jacek@codeweavers.com Date: Fri Feb 26 15:55:26 2021 +0100
include: Add MSVC ARM version of NtCurrentTeb.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
include/winnt.h | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/include/winnt.h b/include/winnt.h index e594c89419a..e19f515eddb 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -2815,6 +2815,12 @@ static FORCEINLINE struct _TEB * WINAPI NtCurrentTeb(void) __asm__("mrc p15, 0, %0, c13, c0, 2" : "=r" (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 extern struct _TEB * WINAPI NtCurrentTeb(void); #endif