From: Heiher Date: Sat, 31 Oct 2015 21:10:06 +0000 (+0800) Subject: Bug 1213146 - IonMonkey: MIPS: Move Assembler::PatchDataWithValueCheck to architectur... X-Git-Tag: archive/raspbian/60.4.0esr-1+rpi1~1^2^2~23 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b3c3d80c6819859ee4f68fbbd728e1e008eca187;p=firefox-esr.git Bug 1213146 - IonMonkey: MIPS: Move Assembler::PatchDataWithValueCheck to architecture specific. r=lth Gbp-Pq: Topic fixes Gbp-Pq: Name Bug-1213146-IonMonkey-MIPS-Move-Assembler-PatchDataW.patch --- diff --git a/js/src/jit/mips-shared/Assembler-mips-shared.cpp b/js/src/jit/mips-shared/Assembler-mips-shared.cpp index 75567af422e..6dbc8d22ea8 100644 --- a/js/src/jit/mips-shared/Assembler-mips-shared.cpp +++ b/js/src/jit/mips-shared/Assembler-mips-shared.cpp @@ -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 diff --git a/js/src/jit/mips-shared/Assembler-mips-shared.h b/js/src/jit/mips-shared/Assembler-mips-shared.h index a939a982578..a42a97650e2 100644 --- a/js/src/jit/mips-shared/Assembler-mips-shared.h +++ b/js/src/jit/mips-shared/Assembler-mips-shared.h @@ -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) { diff --git a/js/src/jit/mips32/Assembler-mips32.cpp b/js/src/jit/mips32/Assembler-mips32.cpp index c11a5864f45..87a963e6c6e 100644 --- a/js/src/jit/mips32/Assembler-mips32.cpp +++ b/js/src/jit/mips32/Assembler-mips32.cpp @@ -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) diff --git a/js/src/jit/mips32/Assembler-mips32.h b/js/src/jit/mips32/Assembler-mips32.h index b986390b262..25877b18e0e 100644 --- a/js/src/jit/mips32/Assembler-mips32.h +++ b/js/src/jit/mips32/Assembler-mips32.h @@ -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); diff --git a/js/src/jit/mips64/Assembler-mips64.cpp b/js/src/jit/mips64/Assembler-mips64.cpp index 1d490f872b2..5a199adfdf1 100644 --- a/js/src/jit/mips64/Assembler-mips64.cpp +++ b/js/src/jit/mips64/Assembler-mips64.cpp @@ -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) diff --git a/js/src/jit/mips64/Assembler-mips64.h b/js/src/jit/mips64/Assembler-mips64.h index fc55787b420..85ca1c1890a 100644 --- a/js/src/jit/mips64/Assembler-mips64.h +++ b/js/src/jit/mips64/Assembler-mips64.h @@ -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);