summaryrefslogtreecommitdiffstats
path: root/js/src/jit/mips64
diff options
context:
space:
mode:
authorJiaxun Yang <jiaxun.yang@flygoat.com>2020-05-12 12:40:05 +0800
committerMoonchild <moonchild@palemoon.org>2020-05-20 14:00:08 +0000
commitfa1628f76785e18240c7c7aca63b99d490879461 (patch)
tree7c439fa2813fe06257385b220c33d78b103f43ed /js/src/jit/mips64
parent0136960ec0658091ff514b71b35ed2720e28254e (diff)
downloadUXP-fa1628f76785e18240c7c7aca63b99d490879461.tar
UXP-fa1628f76785e18240c7c7aca63b99d490879461.tar.gz
UXP-fa1628f76785e18240c7c7aca63b99d490879461.tar.lz
UXP-fa1628f76785e18240c7c7aca63b99d490879461.tar.xz
UXP-fa1628f76785e18240c7c7aca63b99d490879461.zip
Bug 1323136 - wasm: MIPS: Do bounds check in 32-bit
Tag: #1542
Diffstat (limited to 'js/src/jit/mips64')
-rw-r--r--js/src/jit/mips64/MacroAssembler-mips64-inl.h6
-rw-r--r--js/src/jit/mips64/MacroAssembler-mips64.h6
2 files changed, 5 insertions, 7 deletions
diff --git a/js/src/jit/mips64/MacroAssembler-mips64-inl.h b/js/src/jit/mips64/MacroAssembler-mips64-inl.h
index f5737748b..a07619b94 100644
--- a/js/src/jit/mips64/MacroAssembler-mips64-inl.h
+++ b/js/src/jit/mips64/MacroAssembler-mips64-inl.h
@@ -706,8 +706,12 @@ MacroAssembler::wasmBoundsCheck(Condition cond, Register index, L label)
void
MacroAssembler::wasmPatchBoundsCheck(uint8_t* patchAt, uint32_t limit)
{
+ Instruction* inst = (Instruction*) patchAt;
+ InstImm* i0 = (InstImm*) inst;
+ InstImm* i1 = (InstImm*) i0->next();
+
// Replace with new value
- Assembler::UpdateLoad64Value((Instruction*) patchAt, limit);
+ AssemblerMIPSShared::UpdateLuiOriValue(i0, i1, limit);
}
//}}} check_macroassembler_style
diff --git a/js/src/jit/mips64/MacroAssembler-mips64.h b/js/src/jit/mips64/MacroAssembler-mips64.h
index bfe452974..6b98f1f2c 100644
--- a/js/src/jit/mips64/MacroAssembler-mips64.h
+++ b/js/src/jit/mips64/MacroAssembler-mips64.h
@@ -1009,12 +1009,6 @@ class MacroAssemblerMIPS64Compat : public MacroAssemblerMIPS64
as_nop();
}
- BufferOffset ma_BoundsCheck(Register bounded) {
- BufferOffset bo = m_buffer.nextOffset();
- ma_liPatchable(bounded, ImmWord(0));
- return bo;
- }
-
void moveFloat32(FloatRegister src, FloatRegister dest) {
as_movs(dest, src);
}