[NDK][XDK] Add some missing macros for run-time checks of X86 system architecture (NEC support).

This commit is contained in:
Hermès Bélusca-Maïto 2020-11-26 00:17:50 +01:00
parent c295fb95e9
commit 9feab8e95a
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
3 changed files with 45 additions and 0 deletions

View file

@ -221,6 +221,29 @@ typedef CCHAR KPROCESSOR_MODE;
//
#define SharedUserData ((KUSER_SHARED_DATA *)USER_SHARED_DATA)
/* Macros for user-mode run-time checks of X86 system architecture */
#ifdef _X86_
#ifndef IsNEC_98
#define IsNEC_98 (SharedUserData->AlternativeArchitecture == NEC98x86)
#endif
#ifndef IsNotNEC_98
#define IsNotNEC_98 (SharedUserData->AlternativeArchitecture != NEC98x86)
#endif
/* User-mode cannot override the architecture */
#ifndef SetNEC_98
#define SetNEC_98
#endif
/* User-mode cannot override the architecture */
#ifndef SetNotNEC_98
#define SetNotNEC_98
#endif
#endif
//
// Maximum WOW64 Entries in KUSER_SHARED_DATA
//