Bug 1229989 - IonMonkey: MIPS: Fix patchCall for mips32. r=luke
authorHeiher <r@hev.cc>
Thu, 03 Dec 2015 19:22:35 +0800
changeset 309591 857b2d9012c0a21b9ab8737b0de96cf1ee78a748
parent 309590 26118d46571543946031d04e5264d58b4b6729a9
child 309592 1ac1c7f5cf9a2355e5a277fe9d5b29eb20d8dc30
push id5513
push userraliiev@mozilla.com
push dateMon, 25 Jan 2016 13:55:34 +0000
treeherdermozilla-beta@5ee97dd05b5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs1229989
milestone45.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 1229989 - IonMonkey: MIPS: Fix patchCall for mips32. r=luke --- js/src/jit/mips-shared/MacroAssembler-mips-shared.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
js/src/jit/mips-shared/MacroAssembler-mips-shared.cpp
--- a/js/src/jit/mips-shared/MacroAssembler-mips-shared.cpp
+++ b/js/src/jit/mips-shared/MacroAssembler-mips-shared.cpp
@@ -1146,18 +1146,19 @@ MacroAssembler::callWithPatch()
     addLongJump(nextOffset());
     ma_liPatchable(ScratchRegister, ImmWord(0));
     return call(ScratchRegister);
 }
 
 void
 MacroAssembler::patchCall(uint32_t callerOffset, uint32_t calleeOffset)
 {
-    BufferOffset li(callerOffset - 6 * sizeof(uint32_t));
-    Assembler::UpdateLoad64Value(editSrc(li), calleeOffset);
+    BufferOffset li(callerOffset - Assembler::PatchWrite_NearCallSize());
+    Assembler::PatchInstructionImmediate((uint8_t*)editSrc(li),
+                                         PatchedImmPtr((const void*)calleeOffset));
 }
 
 void
 MacroAssembler::call(wasm::SymbolicAddress target)
 {
     movePtr(target, CallReg);
     call(CallReg);
 }