Summary: | MacroAssemblerMIPS does not implement readCallTarget | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Csaba Osztrogonác <ossy> | ||||
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Blocker | CC: | barraclough, fpizlo, fu, loki, ossy, webkit.review.bot, zecke, zherczeg | ||||
Priority: | P1 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Csaba Osztrogonác
2011-11-30 04:56:16 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. Created attachment 117281 [details]
Add MIPS readCallTarget()
I tested release and debug versions of JSC by running run-javascriptcore-tests. The results are ok. Thanks a lot!
Regards,
Chao-ying
Comment on attachment 117281 [details]
Add MIPS readCallTarget()
r=me
Comment on attachment 117281 [details] Add MIPS readCallTarget() Clearing flags on attachment: 117281 Committed r101658: <http://trac.webkit.org/changeset/101658> All reviewed patches have been landed. Closing bug. |