From 60d6ebce928623a9c7ef04b91e246b813bd44a82 Mon Sep 17 00:00:00 2001 From: Tracy Ward Date: Thu, 12 Apr 2018 01:22:04 -0400 Subject: [PATCH] replace "asm nop" with an intrinsic in msvc MS is deprecating inline assembly, and has completely removed it from the x64 compiler. The solution is to use compiler intrinsics. This will hopefully make building for x64 easier in the future. (I might even spend some time attempting to build it for x64). --- src/global.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/global.cpp b/src/global.cpp index f9b6bef8d2..b06af3a350 100644 --- a/src/global.cpp +++ b/src/global.cpp @@ -10,6 +10,9 @@ # include "windows.h" # include "archutils/Win32/Crash.h" # endif +# if defined(_MSC_VER) +# include +# endif #elif defined(MACOSX) # include "archutils/Darwin/Crash.h" # include @@ -46,7 +49,7 @@ void NORETURN sm_crash( const char *reason ) /* Do something after the above, so the call/return isn't optimized to a jmp; that * way, this function will appear in backtrace stack traces. */ #if defined(_MSC_VER) - _asm nop; + __nop(); #elif defined(__GNUC__) // MinGW or similar asm("nop"); #endif