Bug 1213146 - IonMonkey: MIPS: Move Assembler::PatchDataWithValueCheck to architecture specific. r=lth

---
 js/src/jit/mips-shared/Assembler-mips-shared.cpp | 7 -------
 js/src/jit/mips-shared/Assembler-mips-shared.h   | 2 --
 js/src/jit/mips32/Assembler-mips32.cpp           | 8 ++++++++
 js/src/jit/mips32/Assembler-mips32.h             | 3 ++-
 js/src/jit/mips64/Assembler-mips64.cpp           | 8 ++++++++
 js/src/jit/mips64/Assembler-mips64.h             | 3 ++-
 6 files changed, 20 insertions(+), 11 deletions(-)
This commit is contained in:
Heiher 2015-11-01 05:10:06 +08:00
parent 22ecdfe9c8
commit 58cc9c4ede
6 changed files with 20 additions and 11 deletions

View File

@ -1361,13 +1361,6 @@ AssemblerMIPSShared::as_sync(uint32_t stype)
writeInst(InstReg(op_special, zero, zero, zero, stype, ff_sync).encode());
}
void
AssemblerMIPSShared::PatchDataWithValueCheck(CodeLocationLabel label, ImmPtr newValue, ImmPtr expectedValue)
{
Assembler::PatchDataWithValueCheck(label, PatchedImmPtr(newValue.value),
PatchedImmPtr(expectedValue.value));
}
// This just stomps over memory with 32 bits of raw data. Its purpose is to
// overwrite the call of JITed code with 32 bits worth of an offset. This will
// is only meant to function on code that has been invalidated, so it should

View File

@ -1084,8 +1084,6 @@ class AssemblerMIPSShared : public AssemblerShared
static uint32_t NopSize() { return 4; }
static void PatchDataWithValueCheck(CodeLocationLabel label, ImmPtr newValue,
ImmPtr expectedValue);
static void PatchWrite_Imm32(CodeLocationLabel label, Imm32 imm);
static uint32_t AlignDoubleArg(uint32_t offset) {

View File

@ -398,6 +398,14 @@ Assembler::WriteLuiOriInstructions(Instruction* inst0, Instruction* inst1,
*inst1 = InstImm(op_ori, reg, reg, Imm16::Lower(Imm32(value)));
}
void
Assembler::PatchDataWithValueCheck(CodeLocationLabel label, ImmPtr newValue,
ImmPtr expectedValue)
{
PatchDataWithValueCheck(label, PatchedImmPtr(newValue.value),
PatchedImmPtr(expectedValue.value));
}
void
Assembler::PatchDataWithValueCheck(CodeLocationLabel label, PatchedImmPtr newValue,
PatchedImmPtr expectedValue)

View File

@ -122,7 +122,6 @@ class Assembler : public AssemblerMIPSShared
public:
using AssemblerMIPSShared::bind;
using AssemblerMIPSShared::PatchDataWithValueCheck;
void bind(RepatchLabel* label);
void Bind(uint8_t* rawCode, AbsoluteLabel* label, const void* address);
@ -144,6 +143,8 @@ class Assembler : public AssemblerMIPSShared
Register reg, uint32_t value);
static void PatchWrite_NearCall(CodeLocationLabel start, CodeLocationLabel toCall);
static void PatchDataWithValueCheck(CodeLocationLabel label, ImmPtr newValue,
ImmPtr expectedValue);
static void PatchDataWithValueCheck(CodeLocationLabel label, PatchedImmPtr newValue,
PatchedImmPtr expectedValue);

View File

@ -437,6 +437,14 @@ Assembler::WriteLoad64Instructions(Instruction* inst0, Register reg, uint64_t va
*inst3 = InstImm(op_ori, reg, reg, Imm16::Lower(Imm32(value)));
}
void
Assembler::PatchDataWithValueCheck(CodeLocationLabel label, ImmPtr newValue,
ImmPtr expectedValue)
{
PatchDataWithValueCheck(label, PatchedImmPtr(newValue.value),
PatchedImmPtr(expectedValue.value));
}
void
Assembler::PatchDataWithValueCheck(CodeLocationLabel label, PatchedImmPtr newValue,
PatchedImmPtr expectedValue)

View File

@ -124,7 +124,6 @@ class Assembler : public AssemblerMIPSShared
static uintptr_t GetPointer(uint8_t*);
using AssemblerMIPSShared::bind;
using AssemblerMIPSShared::PatchDataWithValueCheck;
void bind(RepatchLabel* label);
void Bind(uint8_t* rawCode, AbsoluteLabel* label, const void* address);
@ -146,6 +145,8 @@ class Assembler : public AssemblerMIPSShared
static void PatchWrite_NearCall(CodeLocationLabel start, CodeLocationLabel toCall);
static void PatchDataWithValueCheck(CodeLocationLabel label, ImmPtr newValue,
ImmPtr expectedValue);
static void PatchDataWithValueCheck(CodeLocationLabel label, PatchedImmPtr newValue,
PatchedImmPtr expectedValue);