diff --git a/CMakeLists.txt b/CMakeLists.txt index a6a48ac077b..d4736894667 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,6 +63,9 @@ if(NOT CMAKE_CROSSCOMPILING) if(ARCH STREQUAL "i386") add_definitions(/D_X86_ /DWIN32 /D_WINDOWS) endif() + if(MSVC_VERSION GREATER 1699) + add_definitions(/D_ALLOW_KEYWORD_MACROS) + endif() add_definitions(/Dinline=__inline) else() add_compile_flags("-fshort-wchar -Wno-multichar") diff --git a/ntoskrnl/ke/i386/cpu.c b/ntoskrnl/ke/i386/cpu.c index 2d741ab6144..09568113b65 100644 --- a/ntoskrnl/ke/i386/cpu.c +++ b/ntoskrnl/ke/i386/cpu.c @@ -1432,7 +1432,8 @@ KeSaveFloatingPointState(OUT PKFLOATING_SAVE Save) #else __asm { - fnsave [FpState] + mov eax, [FpState] + fnsave [eax] }; #endif @@ -1458,7 +1459,8 @@ KeRestoreFloatingPointState(IN PKFLOATING_SAVE Save) __asm { fnclex - frstor [FpState] + mov eax, [FpState] + frstor [eax] }; #endif