Bug 505034 - Compiling Nativei386.cpp on MinGW fails because of different syntax of inline asm. r=graydon
authorJacek Caban <jacek@codeweavers.com>
Mon, 18 Jan 2010 15:08:30 -0500
changeset 37710 af515d48bdcf0f68b5d594ab4d252d6ea203bf51
parent 37709 4e8621ab0232fa3c10df618ad0ea75b192a61a47
child 37711 2b79013c369a99d5216f76c20212e87ed794c875
push idunknown
push userunknown
push dateunknown
reviewersgraydon
bugs505034
milestone1.9.3a1pre
Bug 505034 - Compiling Nativei386.cpp on MinGW fails because of different syntax of inline asm. r=graydon
js/src/nanojit/Nativei386.cpp
--- a/js/src/nanojit/Nativei386.cpp
+++ b/js/src/nanojit/Nativei386.cpp
@@ -307,31 +307,31 @@ namespace nanojit
             SUBi(SP, extra);
         }
     }
 
     Register Assembler::nRegisterAllocFromSet(RegisterMask set)
     {
         Register r;
         RegAlloc &regs = _allocator;
-    #ifdef WIN32
+    #ifdef _MSC_VER
         _asm
         {
             mov ecx, regs
             bsf eax, set                    // i = first bit set
             btr RegAlloc::free[ecx], eax    // free &= ~rmask(i)
             mov r, eax
         }
     #else
         asm(
             "bsf    %1, %%eax\n\t"
             "btr    %%eax, %2\n\t"
             "movl   %%eax, %0\n\t"
             : "=m"(r) : "m"(set), "m"(regs.free) : "%eax", "memory" );
-    #endif /* WIN32 */
+    #endif /* _MSC_VER */
         return r;
     }
 
     void Assembler::nRegisterResetAll(RegAlloc& a)
     {
         // add scratch registers to our free list for the allocator
         a.clear();
         a.free = SavedRegs | ScratchRegs;