diff --git a/Core/Libraries/Source/WWVegas/WWDebug/wwmemlog.cpp b/Core/Libraries/Source/WWVegas/WWDebug/wwmemlog.cpp index c3cd64c9e17..ea7aa211a0e 100644 --- a/Core/Libraries/Source/WWVegas/WWDebug/wwmemlog.cpp +++ b/Core/Libraries/Source/WWVegas/WWDebug/wwmemlog.cpp @@ -316,18 +316,24 @@ WWINLINE void Lock_Mem_Log_Mutex() #define ts_lock _emit 0xF0 assert(((unsigned)&nFlag % 4) == 0); - __asm mov ebx, [nFlag] - __asm ts_lock - __asm bts dword ptr [ebx], 0 - __asm jc The_Bit_Was_Previously_Set_So_Try_Again + __asm + { + mov ebx, [nFlag] + ts_lock + bts dword ptr [ebx], 0 + jc The_Bit_Was_Previously_Set_So_Try_Again + } return; The_Bit_Was_Previously_Set_So_Try_Again: ThreadClass::Switch_Thread(); - __asm mov ebx, [nFlag] - __asm ts_lock - __asm bts dword ptr [ebx], 0 - __asm jc The_Bit_Was_Previously_Set_So_Try_Again + __asm + { + mov ebx, [nFlag] + ts_lock + bts dword ptr [ebx], 0 + jc The_Bit_Was_Previously_Set_So_Try_Again + } #endif } diff --git a/Core/Libraries/Source/WWVegas/WWLib/mutex.h b/Core/Libraries/Source/WWVegas/WWLib/mutex.h index a9c106ce196..ba49fe87264 100644 --- a/Core/Libraries/Source/WWVegas/WWLib/mutex.h +++ b/Core/Libraries/Source/WWVegas/WWLib/mutex.h @@ -160,19 +160,25 @@ class FastCriticalSectionClass // ASM statements because sometimes the jump // would be 1 byte off.... - __asm mov ebx, [nFlag] - __asm ts_lock - __asm bts dword ptr [ebx], 0 - __asm jnc BitSet + __asm + { + mov ebx, [nFlag] + ts_lock + bts dword ptr [ebx], 0 + jnc BitSet + } //__asm _emit 0x73 //__asm _emit 0x0f The_Bit_Was_Previously_Set_So_Try_Again: ThreadClass::Switch_Thread(); - __asm mov ebx, [nFlag] - __asm ts_lock - __asm bts dword ptr [ebx], 0 - __asm jc The_Bit_Was_Previously_Set_So_Try_Again + __asm + { + mov ebx, [nFlag] + ts_lock + bts dword ptr [ebx], 0 + jc The_Bit_Was_Previously_Set_So_Try_Again + } //_asm _emit 0x72 //_asm _emit 0xf1 diff --git a/Core/Libraries/Source/debug/debug_debug.cpp b/Core/Libraries/Source/debug/debug_debug.cpp index e15d074b4ab..bfb50de1ba8 100644 --- a/Core/Libraries/Source/debug/debug_debug.cpp +++ b/Core/Libraries/Source/debug/debug_debug.cpp @@ -436,7 +436,10 @@ bool Debug::AssertDone() break; case IDRETRY: #if defined(_MSC_VER) - _asm int 0x03 + _asm + { + int 0x03 + } #elif defined(__GNUC__) __builtin_trap(); #else @@ -710,7 +713,10 @@ bool Debug::CrashDone(bool die) break; case IDRETRY: #if defined(_MSC_VER) - _asm int 0x03 + _asm + { + int 0x03 + } #elif defined(__GNUC__) __builtin_trap(); #else diff --git a/Core/Tools/WW3D/pluglib/wwmath.h b/Core/Tools/WW3D/pluglib/wwmath.h index c8ca586da91..ef84d4a49c0 100644 --- a/Core/Tools/WW3D/pluglib/wwmath.h +++ b/Core/Tools/WW3D/pluglib/wwmath.h @@ -205,8 +205,11 @@ inline long WWMath::Float_To_Long (float f) { #if defined(_MSC_VER) && defined(_M_IX86) long retval; - __asm fld dword ptr [f] - __asm fistp dword ptr [retval] + __asm + { + fld dword ptr [f] + fistp dword ptr [retval] + } return retval; #else return (long) f; @@ -217,8 +220,11 @@ inline long WWMath::Float_To_Long (double f) { #if defined(_MSC_VER) && defined(_M_IX86) long retval; - __asm fld qword ptr [f] - __asm fistp dword ptr [retval] + __asm + { + fld qword ptr [f] + fistp dword ptr [retval] + } return retval; #else return (long) f;