LIR compiler

From MozillaWiki
Revision as of 22:24, 3 February 2009 by Jorend (talk | contribs) (→‎Open issues: fmt tweak)
Jump to navigation Jump to search

A project to write a Nanojit-based tool that reads a file containing Nanojit LIR instructions and spits out a .s file that you can then feed to your platform's assembler (if you happen to be on the right platform, anyway).

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


Open issues

  • Need stub code (or docs) for pieces of Nanojit that are provided by the application, like MMgc and VerboseWriter::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. ji and xi.