From 6157d7eb3e40f0b649d668dba8b9e8173e6cc6f8 Mon Sep 17 00:00:00 2001 From: "Ben \"root\" Anderson" Date: Sat, 26 Oct 2013 15:04:59 -0500 Subject: [PATCH] This is Intel syntax! --- src/archutils/Win32/Crash.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/archutils/Win32/Crash.cpp b/src/archutils/Win32/Crash.cpp index 6a63ca833e..fe4b1b7d0c 100644 --- a/src/archutils/Win32/Crash.cpp +++ b/src/archutils/Win32/Crash.cpp @@ -543,11 +543,14 @@ static void NORETURN debug_crash() // __asm mov dword ptr [ebx],eax // __asm lock add dword ptr cs:[00000000h], 12345678h #elif defined(__GNUC__) - asm("xor ebx,ebx" + // HACK: I don't know a lick of ASM and don't know how to port this to + // the AT&T syntax gas uses. So we temporarily change it. + asm(".intel_syntax noprefix" + "xor ebx,ebx" "mov eax,dword ptr [ebx]" // "mov dword ptr [ebx],eax" // "lock add dword ptr cs:[00000000h], 12345678h" - ); + ".att_syntax noprefix"); #endif // } __except( CrashHandler::ExceptionHandler((EXCEPTION_POINTERS*)_exception_info()) ) { // }