summaryrefslogtreecommitdiffstats
path: root/js/src/jit/mips-shared/MacroAssembler-mips-shared.h
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/mips-shared/MacroAssembler-mips-shared.h
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/mips-shared/MacroAssembler-mips-shared.h')
-rw-r--r--js/src/jit/mips-shared/MacroAssembler-mips-shared.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/js/src/jit/mips-shared/MacroAssembler-mips-shared.h b/js/src/jit/mips-shared/MacroAssembler-mips-shared.h
index c9bd4a4d9..aea389d8a 100644
--- a/js/src/jit/mips-shared/MacroAssembler-mips-shared.h
+++ b/js/src/jit/mips-shared/MacroAssembler-mips-shared.h
@@ -65,6 +65,7 @@ class MacroAssemblerMIPSShared : public Assembler
void ma_li(Register dest, ImmGCPtr ptr);
void ma_li(Register dest, Imm32 imm);
+ void ma_liPatchable(Register dest, Imm32 imm);
// Shift operations
void ma_sll(Register rd, Register rt, Imm32 shift);
@@ -184,6 +185,12 @@ class MacroAssemblerMIPSShared : public Assembler
void ma_cmp_set_double(Register dst, FloatRegister lhs, FloatRegister rhs, DoubleCondition c);
void ma_cmp_set_float32(Register dst, FloatRegister lhs, FloatRegister rhs, DoubleCondition c);
+ BufferOffset ma_BoundsCheck(Register bounded) {
+ BufferOffset bo = m_buffer.nextOffset();
+ ma_liPatchable(bounded, Imm32(0));
+ return bo;
+ }
+
void moveToDoubleLo(Register src, FloatRegister dest) {
as_mtc1(src, dest);
}