Bug 1372958 Stack alignment on Windows is 4 bytes, not 16 r=luke
authorTom Ritter <tom@mozilla.com>
Fri, 06 Oct 2017 16:43:07 -0500
changeset 685824 6780969991ed697b03b7a8b2cc80d46fc41d9828
parent 685823 4f223f11a08ff2c3c6cefa68722a10113c04317c
child 685825 ba4a39241953d5079dba48dddac6093f161745aa
push id86016
push userkgupta@mozilla.com
push dateWed, 25 Oct 2017 01:53:44 +0000
reviewersluke
bugs1372958
milestone58.0a1
Bug 1372958 Stack alignment on Windows is 4 bytes, not 16 r=luke MozReview-Commit-ID: sLOruY3UJE
js/src/jit/x86/Assembler-x86.h
--- a/js/src/jit/x86/Assembler-x86.h
+++ b/js/src/jit/x86/Assembler-x86.h
@@ -129,17 +129,17 @@ static constexpr Register RegExpMatcherL
 
 // Registerd used in RegExpTester instruction (do not use ReturnReg).
 static constexpr Register RegExpTesterRegExpReg = CallTempReg0;
 static constexpr Register RegExpTesterStringReg = CallTempReg2;
 static constexpr Register RegExpTesterLastIndexReg = CallTempReg3;
 
 // GCC stack is aligned on 16 bytes. Ion does not maintain this for internal
 // calls. wasm code does.
-#if defined(__GNUC__)
+#if defined(__GNUC__) && !defined(__MINGW32__)
 static constexpr uint32_t ABIStackAlignment = 16;
 #else
 static constexpr uint32_t ABIStackAlignment = 4;
 #endif
 static constexpr uint32_t CodeAlignment = 16;
 static constexpr uint32_t JitStackAlignment = 16;
 
 static constexpr uint32_t JitStackValueAlignment = JitStackAlignment / sizeof(Value);