Jacek Caban : winnt.h: Provide inline NtCurrentTeb implementation for mingw arm builds.
Alexandre Julliard
julliard at winehq.org
Wed May 27 15:19:31 CDT 2020
Module: wine
Branch: master
Commit: 6a05b84ecaf6fa1f3343011351f9bdd2e4e5eaf2
URL: https://source.winehq.org/git/wine.git/?a=commit;h=6a05b84ecaf6fa1f3343011351f9bdd2e4e5eaf2
Author: Jacek Caban <jacek at codeweavers.com>
Date: Wed May 27 20:19:04 2020 +0200
winnt.h: Provide inline NtCurrentTeb implementation for mingw arm builds.
Based on mingw-w64.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
include/winnt.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/include/winnt.h b/include/winnt.h
index ae9177842b..34951766dd 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -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
More information about the wine-cvs
mailing list