RESOLVED FIXED 73432
MacroAssemblerMIPS does not implement readCallTarget
https://bugs.webkit.org/show_bug.cgi?id=73432
Summary MacroAssemblerMIPS does not implement readCallTarget
Csaba Osztrogonác
Reported 2011-11-30 04:56:16 PST
It is blocker bug, beacuse after http://trac.webkit.org/changeset/101457 Qt-MIPS build is broken. (and all other MIPS build of course)
Attachments
Add MIPS readCallTarget() (2.30 KB, patch)
2011-11-30 14:55 PST, Chao-ying Fu
no flags
Chao-ying Fu
Comment 1 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.
Chao-ying Fu
Comment 2 2011-11-30 14:55:58 PST
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
Zoltan Herczeg
Comment 3 2011-12-01 03:31:31 PST
Comment on attachment 117281 [details] Add MIPS readCallTarget() r=me
WebKit Review Bot
Comment 4 2011-12-01 04:42:23 PST
Comment on attachment 117281 [details] Add MIPS readCallTarget() Clearing flags on attachment: 117281 Committed r101658: <http://trac.webkit.org/changeset/101658>
WebKit Review Bot
Comment 5 2011-12-01 04:42:28 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.