Bug 1382650 part 6 - Fix ARM64 implementation of branch32(AbsoluteAddress, Imm32). r=nbp
authorJan de Mooij <jdemooij@mozilla.com>
Wed, 27 Mar 2019 18:58:27 +0000
changeset 466419 6960595971e59ed7c59ea4e77134f66ae1aeac57
parent 466418 0614a9178eeff65e032b6729df6e2f61562a9dc7
child 466420 217849cb7750831a9dd8ef637819374399650d4a
push id35768
push useropoprus@mozilla.com
push dateThu, 28 Mar 2019 09:55:54 +0000
treeherdermozilla-central@c045dd97faf2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnbp
bugs1382650
milestone68.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 1382650 part 6 - Fix ARM64 implementation of branch32(AbsoluteAddress, Imm32). r=nbp The old code would assert because we needed too many scratch registers, but it was dead code until this patch. Differential Revision: https://phabricator.services.mozilla.com/D24158
js/src/jit/arm64/MacroAssembler-arm64-inl.h
--- a/js/src/jit/arm64/MacroAssembler-arm64-inl.h
+++ b/js/src/jit/arm64/MacroAssembler-arm64-inl.h
@@ -823,18 +823,18 @@ void MacroAssembler::branch32(Condition 
   movePtr(ImmPtr(lhs.addr), scratch);
   branch32(cond, Address(scratch, 0), rhs, label);
 }
 
 void MacroAssembler::branch32(Condition cond, const AbsoluteAddress& lhs,
                               Imm32 rhs, Label* label) {
   vixl::UseScratchRegisterScope temps(this);
   const Register scratch = temps.AcquireX().asUnsized();
-  movePtr(ImmPtr(lhs.addr), scratch);
-  branch32(cond, Address(scratch, 0), rhs, label);
+  load32(lhs, scratch);
+  branch32(cond, scratch, rhs, label);
 }
 
 void MacroAssembler::branch32(Condition cond, const BaseIndex& lhs, Imm32 rhs,
                               Label* label) {
   vixl::UseScratchRegisterScope temps(this);
   const ARMRegister scratch32 = temps.AcquireW();
   MOZ_ASSERT(scratch32.asUnsized() != lhs.base);
   MOZ_ASSERT(scratch32.asUnsized() != lhs.index);