Bug 1352500 - Baldr: Force stack alignment for asm.js atomics callouts on ARM. r=luke, a=gchang
authorBenjamin Bouvier <benj@benj.me>
Fri, 31 Mar 2017 20:10:18 +0200
changeset 395660 e99180e4d04608f53182e8d55e981ae3a3d27050
parent 395659 c3c509c0b9710393913ffb699d347334090acc31
child 395661 c2746f2573a0c6756325bb32f67db6450b005f09
push id1468
push userasasaki@mozilla.com
push dateMon, 05 Jun 2017 19:31:07 +0000
treeherdermozilla-release@0641fc6ee9d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke, gchang
bugs1352500
milestone54.0a2
Bug 1352500 - Baldr: Force stack alignment for asm.js atomics callouts on ARM. r=luke, a=gchang 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
@@ -882,16 +882,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(useRegisterAtStart(base),
                                                       useRegisterAtStart(ins->oldValue()),
                                                       useRegisterAtStart(ins->newValue()),
                                                       useFixed(ins->tls(), WasmTlsReg),
                                                       temp(), temp());
         defineReturn(lir, ins);
         return;
@@ -911,16 +913,18 @@ LIRGeneratorARM::visitAsmJSAtomicExchang
     MOZ_ASSERT(ins->base()->type() == MIRType::Int32);
     MOZ_ASSERT(ins->access().type() < Scalar::Float32);
     MOZ_ASSERT(ins->access().offset() == 0);
 
     const LAllocation base = useRegisterAtStart(ins->base());
     const LAllocation value = useRegisterAtStart(ins->value());
 
     if (byteSize(ins->access().type()) < 4 && !HasLDSTREXBHD()) {
+        gen->setPerformsCall();
+
         // Call out on ARMv6.
         defineReturn(new(alloc()) LAsmJSAtomicExchangeCallout(base, value,
                                                               useFixed(ins->tls(), WasmTlsReg),
                                                               temp(), temp()), ins);
         return;
     }
 
     define(new(alloc()) LAsmJSAtomicExchangeHeap(base, value), ins);
@@ -931,16 +935,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(useRegisterAtStart(base),
                                                   useRegisterAtStart(ins->value()),
                                                   useFixed(ins->tls(), WasmTlsReg),
                                                   temp(), temp());
         defineReturn(lir, ins);
         return;
     }