[Webkit-unassigned] [Bug 73432] MacroAssemblerMIPS does not implement readCallTarget
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Nov 30 11:39:48 PST 2011
https://bugs.webkit.org/show_bug.cgi?id=73432
--- Comment #1 from Chao-ying Fu <fu at mips.com> 2011-11-30 11:39:48 PST ---
Can you try this patch quickly? I haven't had time to test. Thanks a lot!
Regards,
Chao-ying
Index: MIPSAssembler.h
===================================================================
--- MIPSAssembler.h (revision 101454)
+++ MIPSAssembler.h (working copy)
@@ -772,6 +772,18 @@
return reinterpret_cast<void*>(readInt32(from));
}
+ static void* readCallTarget(void* from)
+ {
+ MIPSWord* insn = reinterpret_cast<MIPSWord*>(from);
+ insn -= 4;
+ ASSERT((*insn & 0xffe00000) == 0x3c000000); // lui
+ int32_t result = (*insn & 0x0000ffff) << 16;
+ insn++;
+ ASSERT((*insn & 0xfc000000) == 0x34000000); // ori
+ result |= *insn & 0x0000ffff;
+ return reinterpret_cast<void*>(result);
+ }
+
private:
/* Update each jump in the buffer of newBase. */
void relocateJumps(void* oldBase, void* newBase)
Index: MacroAssemblerMIPS.h
===================================================================
--- MacroAssemblerMIPS.h (revision 101454)
+++ MacroAssemblerMIPS.h (working copy)
@@ -1815,6 +1815,11 @@
m_assembler.nop();
}
+ static FunctionPtr readCallTarget(CodeLocationCall call)
+ {
+ return FunctionPtr(reinterpret_cast<void(*)()>(MIPSAssembler::readCallTarget(call.dataLocation())));
+ }
+
private:
// If m_fixedWidth is true, we will generate a fixed number of instructions.
// Otherwise, we can emit any number of instructions.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list