From 0447d9bed3fb4407928922001ce5e577cd55bb0c Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Mon, 27 Jul 2009 07:49:54 -0600 Subject: [PATCH] use __MINGW32__ instead of __WINDOWS__ in x86.cpp and assume Linux if it's not defined --- src/compile.cpp | 2 +- src/x86.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/compile.cpp b/src/compile.cpp index ff6f15a5a6..b72fa5182b 100644 --- a/src/compile.cpp +++ b/src/compile.cpp @@ -32,7 +32,7 @@ vmCall(); namespace { -const bool DebugCompile = false; +const bool DebugCompile = true; const bool DebugNatives = false; const bool DebugCallTable = false; const bool DebugMethodTree = false; diff --git a/src/x86.cpp b/src/x86.cpp index 258f7e5821..59959a2ce9 100644 --- a/src/x86.cpp +++ b/src/x86.cpp @@ -2101,7 +2101,7 @@ class MyArchitecture: public Assembler::Architecture { } virtual unsigned frameFootprint(unsigned footprint) { -#ifdef __WINDOWS__ +#ifdef __MINGW32__ return max(footprint, StackAlignmentInWords); #else return max(footprint > argumentRegisterCount() ? @@ -2115,9 +2115,9 @@ class MyArchitecture: public Assembler::Architecture { } virtual unsigned argumentRegisterCount() { -#ifdef __WINDOWS__ +#ifdef __MINGW32__ if (BytesPerWord == 8) return 4; else -#elif defined __LINUX__ +#else if (BytesPerWord == 8) return 6; else #endif return 0; @@ -2126,7 +2126,7 @@ class MyArchitecture: public Assembler::Architecture { virtual int argumentRegister(unsigned index) { assert(&c, BytesPerWord == 8); switch (index) { -#ifdef __WINDOWS__ +#ifdef __MINGW32__ case 0: return rcx; case 1: @@ -2135,7 +2135,7 @@ class MyArchitecture: public Assembler::Architecture { return r8; case 3: return r9; -#elif defined __LINUX__ +#else case 0: return rdi; case 1: