Bug 1516693 - ARM64: Correctly update framePushed_ in buildOOLFakeExitFrame(). r=nbp
authorSean Stangl <sean.stangl@gmail.com>
Fri, 28 Dec 2018 13:07:00 +0200
changeset 509414 6a3570bb4ae04c20679bc273314f71335a8f6b36
parent 509413 b3acccbde849d18bf5302a545bc005a13e1a1432
child 509415 72902d6e1c3feadefeee27fc2bb91f53864a5a9b
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnbp
bugs1516693
milestone66.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 1516693 - ARM64: Correctly update framePushed_ in buildOOLFakeExitFrame(). r=nbp
js/src/jit/arm/MacroAssembler-arm.cpp
js/src/jit/arm64/MacroAssembler-arm64.cpp
js/src/jit/arm64/MacroAssembler-arm64.h
--- a/js/src/jit/arm/MacroAssembler-arm.cpp
+++ b/js/src/jit/arm/MacroAssembler-arm.cpp
@@ -1625,17 +1625,16 @@ BufferOffset MacroAssemblerARM::ma_vstr(
                                         Register index,
                                         AutoRegisterScope& scratch,
                                         int32_t shift, Condition cc) {
   as_add(scratch, base, lsl(index, shift), LeaveCC, cc);
   return as_vdtr(IsStore, src, Operand(Address(scratch, 0)).toVFPAddr(), cc);
 }
 
 bool MacroAssemblerARMCompat::buildOOLFakeExitFrame(void* fakeReturnAddr) {
-  DebugOnly<uint32_t> initialDepth = asMasm().framePushed();
   uint32_t descriptor = MakeFrameDescriptor(
       asMasm().framePushed(), FrameType::IonJS, ExitFrameLayout::Size());
 
   asMasm().Push(Imm32(descriptor));  // descriptor_
   asMasm().Push(ImmPtr(fakeReturnAddr));
 
   return true;
 }
--- a/js/src/jit/arm64/MacroAssembler-arm64.cpp
+++ b/js/src/jit/arm64/MacroAssembler-arm64.cpp
@@ -818,16 +818,24 @@ uint32_t MacroAssembler::pushFakeReturnA
   Push(scratch);
   bind(&fakeCallsite);
   uint32_t pseudoReturnOffset = currentOffset();
 
   leaveNoPool();
   return pseudoReturnOffset;
 }
 
+bool MacroAssemblerCompat::buildOOLFakeExitFrame(void* fakeReturnAddr) {
+  uint32_t descriptor = MakeFrameDescriptor(
+      asMasm().framePushed(), FrameType::IonJS, ExitFrameLayout::Size());
+  asMasm().Push(Imm32(descriptor));
+  asMasm().Push(ImmPtr(fakeReturnAddr));
+  return true;
+}
+
 // ===============================================================
 // Move instructions
 
 void MacroAssembler::moveValue(const TypedOrValueRegister& src,
                                const ValueOperand& dest) {
   if (src.hasValue()) {
     moveValue(src.valueReg(), dest);
     return;
--- a/js/src/jit/arm64/MacroAssembler-arm64.h
+++ b/js/src/jit/arm64/MacroAssembler-arm64.h
@@ -2013,23 +2013,17 @@ class MacroAssemblerCompat : public vixl
       And(ARMRegister(dest, 64), ARMRegister(dest, 64),
           Operand(JSVAL_TAG_MASK));
     } else {
       Bfxil(ARMRegister(dest, 64), ARMRegister(src, 64), 0, JSVAL_TAG_SHIFT);
     }
   }
 
  protected:
-  bool buildOOLFakeExitFrame(void* fakeReturnAddr) {
-    uint32_t descriptor = MakeFrameDescriptor(framePushed(), FrameType::IonJS,
-                                              ExitFrameLayout::Size());
-    Push(Imm32(descriptor));
-    Push(ImmPtr(fakeReturnAddr));
-    return true;
-  }
+  bool buildOOLFakeExitFrame(void* fakeReturnAddr);
 };
 
 // See documentation for ScratchTagScope and ScratchTagScopeRelease in
 // MacroAssembler-x64.h.
 
 class ScratchTagScope {
   vixl::UseScratchRegisterScope temps_;
   ARMRegister scratch64_;