Jacek Caban : include: Add MSVC ARM version of NtCurrentTeb.

Alexandre Julliard julliard at winehq.org
Fri Feb 26 14:39:29 CST 2021


Module: wine
Branch: master
Commit: 4fdea7a7cab3283e7d2eec7538f5da0493c1d68d
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=4fdea7a7cab3283e7d2eec7538f5da0493c1d68d

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Fri Feb 26 15:55:26 2021 +0100

include: Add MSVC ARM version of NtCurrentTeb.

Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at 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




More information about the wine-cvs mailing list