LIR compiler: Difference between revisions
Jump to navigation
Jump to search
(→Goal 1) |
|||
| (2 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
A project to write a Nanojit-based tool that reads a file containing Nanojit LIR instructions and spits out a | A project to write a Nanojit-based tool that reads a file containing Nanojit LIR instructions and spits out the binary code to a file so it can be disassembled or executed. | ||
Contacts: paritosh1010 and Jason Orendorff (jorendorff at mozilla dot com) | Contacts: paritosh1010 and Jason Orendorff (jorendorff at mozilla dot com) | ||
| Line 16: | Line 16: | ||
ret twoPlusTwo | ret twoPlusTwo | ||
It's probably not too early to start using e.g. [http://flex.sourceforge.net/ flex] and [http://www.hwaci.com/sw/lemon/lemon.html Lemon] (tools for creating parsers). | |||
==Open issues== | ==Open issues== | ||
| Line 21: | Line 22: | ||
* Need stub code (or docs) for pieces of Nanojit that are provided by the application, like <code>MMgc</code> and <code>VerboseWriter::formatGuard</code>. | * Need stub code (or docs) for pieces of Nanojit that are provided by the application, like <code>MMgc</code> and <code>VerboseWriter::formatGuard</code>. | ||
* jorendorff doesn't understand guards well enough. Need to figure out what side exits should actually do. | * jorendorff doesn't understand guards well enough. Need to figure out what side exits should actually do. | ||
* If this tool is to be used cross-platform for testing, it would really help to be able to say <code>x = ld p[6 * sizeof intptr_t] | * If this tool is to be used cross-platform for testing, it would really help to be able to say <code>x = ld p[6 * sizeof intptr_t]</code> | ||
* Many opcodes are not well understood, e.g. <code>ji</code> and <code>xi</code>. | * Many opcodes are not well understood, e.g. <code>ji</code> and <code>xi</code>. | ||
Latest revision as of 17:02, 25 February 2009
A project to write a Nanojit-based tool that reads a file containing Nanojit LIR instructions and spits out the binary code to a file so it can be disassembled or executed.
Contacts: paritosh1010 and Jason Orendorff (jorendorff at mozilla dot com)
Goal 0
Write, compile and link a small C++ program with the Nanojit library.
Goal 1
Get a program to successfully feed this input to a nanojit::LirWriter.
start two = int 2 twoPlusTwo = add two, two ret twoPlusTwo
It's probably not too early to start using e.g. flex and Lemon (tools for creating parsers).
Open issues
- Need stub code (or docs) for pieces of Nanojit that are provided by the application, like
MMgcandVerboseWriter::formatGuard. - jorendorff doesn't understand guards well enough. Need to figure out what side exits should actually do.
- If this tool is to be used cross-platform for testing, it would really help to be able to say
x = ld p[6 * sizeof intptr_t] - Many opcodes are not well understood, e.g.
jiandxi.