Bug 1352500: Baldr: Force stack alignment for asm.js atomics callouts on ARM; r=luke
authorBenjamin Bouvier <benj@benj.me>
Fri, 31 Mar 2017 20:10:18 +0200
changeset 350717 26c12944db87f935c1db5dccbef00c0b9c36f5e7
parent 350716 42ea3fb4b6944bb7f6986e38ff7d66a3d1d04ae3
child 350718 820b47fb3e42663c49fb8acb2c10da321b3128db
push id88696
push userbbouvier@mozilla.com
push dateFri, 31 Mar 2017 18:28:43 +0000
treeherdermozilla-inbound@26c12944db87 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs1352500
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1352500: Baldr: Force stack alignment for asm.js atomics callouts on ARM; r=luke MozReview-Commit-ID: HsROuItxJMX
js/src/jit/arm/Lowering-arm.cpp
--- a/js/src/jit/arm/Lowering-arm.cpp
+++ b/js/src/jit/arm/Lowering-arm.cpp
@@ -897,16 +897,18 @@ LIRGeneratorARM::visitAsmJSCompareExchan
 {
     MOZ_ASSERT(ins->access().type() < Scalar::Float32);
     MOZ_ASSERT(ins->access().offset() == 0);
 
     MDefinition* base = ins->base();
     MOZ_ASSERT(base->type() == MIRType::Int32);
 
     if (byteSize(ins->access().type()) != 4 && !HasLDSTREXBHD()) {
+        gen->setPerformsCall();
+
         LAsmJSCompareExchangeCallout* lir =
             new(alloc()) LAsmJSCompareExchangeCallout(useFixedAtStart(base, IntArgReg2),
                                                       useFixedAtStart(ins->oldValue(), IntArgReg3),
                                                       useFixedAtStart(ins->newValue(), CallTempReg0),
                                                       useFixedAtStart(ins->tls(), WasmTlsReg),
                                                       tempFixed(IntArgReg0),
                                                       tempFixed(IntArgReg1));
         defineReturn(lir, ins);
@@ -924,16 +926,18 @@ LIRGeneratorARM::visitAsmJSCompareExchan
 void
 LIRGeneratorARM::visitAsmJSAtomicExchangeHeap(MAsmJSAtomicExchangeHeap* ins)
 {
     MOZ_ASSERT(ins->base()->type() == MIRType::Int32);
     MOZ_ASSERT(ins->access().type() < Scalar::Float32);
     MOZ_ASSERT(ins->access().offset() == 0);
 
     if (byteSize(ins->access().type()) < 4 && !HasLDSTREXBHD()) {
+        gen->setPerformsCall();
+
         // Call out on ARMv6.
         defineReturn(new(alloc()) LAsmJSAtomicExchangeCallout(useFixedAtStart(ins->base(), IntArgReg2),
                                                               useFixedAtStart(ins->value(), IntArgReg3),
                                                               useFixedAtStart(ins->tls(), WasmTlsReg),
                                                               tempFixed(IntArgReg0),
                                                               tempFixed(IntArgReg1)), ins);
         return;
     }
@@ -948,16 +952,18 @@ LIRGeneratorARM::visitAsmJSAtomicBinopHe
 {
     MOZ_ASSERT(ins->access().type() < Scalar::Float32);
     MOZ_ASSERT(ins->access().offset() == 0);
 
     MDefinition* base = ins->base();
     MOZ_ASSERT(base->type() == MIRType::Int32);
 
     if (byteSize(ins->access().type()) != 4 && !HasLDSTREXBHD()) {
+        gen->setPerformsCall();
+
         LAsmJSAtomicBinopCallout* lir =
             new(alloc()) LAsmJSAtomicBinopCallout(useFixedAtStart(base, IntArgReg2),
                                                   useFixedAtStart(ins->value(), IntArgReg3),
                                                   useFixedAtStart(ins->tls(), WasmTlsReg),
                                                   tempFixed(IntArgReg0),
                                                   tempFixed(IntArgReg1));
         defineReturn(lir, ins);
         return;