Bug 1372958 Stack alignment on Windows is 4 bytes, not 16 r?dmajor draft
authorTom Ritter <tom@mozilla.com>
Fri, 06 Oct 2017 16:43:07 -0500
changeset 682910 e2f445faa99b94fe4b3ff26b5dea749523aabed2
parent 682898 a04860cd9c8895aaaadaa32efec5e8b2cdcd24e8
child 682911 62240653c0e79afc862e4ef11d2f16a227ce9327
child 682917 b133f2889458bc7f04ab7197d39c932b005c700c
push id85200
push userbmo:tom@mozilla.com
push dateWed, 18 Oct 2017 23:27:26 +0000
reviewersdmajor
bugs1372958
milestone58.0a1
Bug 1372958 Stack alignment on Windows is 4 bytes, not 16 r?dmajor 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);