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).
This commit is contained in:
+4
-1
@@ -10,6 +10,9 @@
|
||||
# include "windows.h"
|
||||
# include "archutils/Win32/Crash.h"
|
||||
# endif
|
||||
# if defined(_MSC_VER)
|
||||
# include <intrin.h>
|
||||
# endif
|
||||
#elif defined(MACOSX)
|
||||
# include "archutils/Darwin/Crash.h"
|
||||
# include <stdlib.h>
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user