diff options
author | Jiaxun Yang <jiaxun.yang@flygoat.com> | 2020-05-12 12:40:05 +0800 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-05-20 14:00:08 +0000 |
commit | fa1628f76785e18240c7c7aca63b99d490879461 (patch) | |
tree | 7c439fa2813fe06257385b220c33d78b103f43ed /js/src/jit/mips-shared/Assembler-mips-shared.cpp | |
parent | 0136960ec0658091ff514b71b35ed2720e28254e (diff) | |
download | UXP-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/Assembler-mips-shared.cpp')
-rw-r--r-- | js/src/jit/mips-shared/Assembler-mips-shared.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/js/src/jit/mips-shared/Assembler-mips-shared.cpp b/js/src/jit/mips-shared/Assembler-mips-shared.cpp index f813eb946..58af49dda 100644 --- a/js/src/jit/mips-shared/Assembler-mips-shared.cpp +++ b/js/src/jit/mips-shared/Assembler-mips-shared.cpp @@ -1744,3 +1744,12 @@ AssemblerMIPSShared::ToggleToCmp(CodeLocationLabel inst_) AutoFlushICache::flush(uintptr_t(inst), 4); } +void +AssemblerMIPSShared::UpdateLuiOriValue(Instruction* inst0, Instruction* inst1, uint32_t value) +{ + MOZ_ASSERT(inst0->extractOpcode() == ((uint32_t)op_lui >> OpcodeShift)); + MOZ_ASSERT(inst1->extractOpcode() == ((uint32_t)op_ori >> OpcodeShift)); + + ((InstImm*) inst0)->setImm16(Imm16::Upper(Imm32(value))); + ((InstImm*) inst1)->setImm16(Imm16::Lower(Imm32(value))); +} |