现在的位置: 首页 > 综合 > 正文

want to port JIT to MIPS, any coworker or any hint?

2013年10月23日 ⁄ 综合 ⁄ 共 1129字 ⁄ 字号 评论关闭

https://lists.webkit.org/pipermail/webkit-dev/2009-January/006460.html

want to port JIT to MIPS, any coworker or any hint?

Feature:
1.	DEBUG_WITH_BREAKPOINT
2.	breakpoint()

首先移植逻辑比较简单的YARR_JIT(只包含c-->JIT Code, 没有JIT Code-->C的callback.), 然后通过插入
breakpoint 的方式检查产生代码是否正确。????

> Just build webkit on XP using cgywin, not tested yet. I want to port  
> to 32bit MIPS, it seems I need to touch JIT and rewrite assembler  
> folder.

Once you have the bytecode interpreter up and running on MIPS, I'd  
recommend starting by just trying to port WREC (the regular expression  
JIT).  This is a good starting point because it utilizes a smaller  
subset of the MacroAssembler interface, and has a much simpler  
interface to C code (JIT code is called with C calling conventions,  
and no callbacks are made into C from the JIT generated code).

> Any document there on javascripcore/assembler? I also want a smart  
> way to make sure output is correct.

A very simple way to validate you are generating the correct code is  
to simply force the JIT to insert a breakpoint (i.e. use  
MacroAssembler::breakpoint()) at the head of the function you are  
generating, then run jsc under a debugger, and when it hits the  
breakpoint simply disassemble the code in memory at the point it has  
stopped.  Now you can visually inspect that it it has generated the  
code you were expecting.

抱歉!评论已关闭.