Bug 1492912 : [MIPS] Make MacroAssemblerMIPSCompat::tagValue not assert if the payload is the same as output type register; r=froydnj
authordragan.mladjenovic <dragan.mladjenovic@rt-rk.com>
Thu, 20 Sep 2018 10:35:00 +0300
changeset 495184 ac7be31e4ad61f8e35f87ce95952415ae4f52896
parent 495183 b41f84a1a1e2607875fcfa51b9fb2d1ff4d19598
child 495185 27ba9965ff0aa4224c22b72aeae19cf8f6e09aa8
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1492912
milestone64.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 1492912 : [MIPS] Make MacroAssemblerMIPSCompat::tagValue not assert if the payload is the same as output type register; r=froydnj
js/src/jit/mips32/MacroAssembler-mips32.cpp
--- a/js/src/jit/mips32/MacroAssembler-mips32.cpp
+++ b/js/src/jit/mips32/MacroAssembler-mips32.cpp
@@ -1771,21 +1771,21 @@ MacroAssemblerMIPSCompat::loadValue(Addr
         ma_lw(val.typeReg(), Address(src.base, src.offset + TAG_OFFSET));
         ma_lw(val.payloadReg(), Address(src.base, src.offset + PAYLOAD_OFFSET));
     }
 }
 
 void
 MacroAssemblerMIPSCompat::tagValue(JSValueType type, Register payload, ValueOperand dest)
 {
-    MOZ_ASSERT(payload != dest.typeReg());
-    ma_li(dest.typeReg(), ImmType(type));
+    MOZ_ASSERT(dest.typeReg() != dest.payloadReg());
     if (payload != dest.payloadReg()) {
         ma_move(dest.payloadReg(), payload);
     }
+    ma_li(dest.typeReg(), ImmType(type));
 }
 
 void
 MacroAssemblerMIPSCompat::pushValue(ValueOperand val)
 {
     // Allocate stack slots for type and payload. One for each.
     asMasm().subPtr(Imm32(sizeof(Value)), StackPointer);
     // Store type and payload.