Related articles |
---|
Generating JIT compilers savage@light-speed.de (Jens Troeger) (2003-07-02) |
Re: Generating JIT compilers eeide@cs.utah.edu (Eric Eide) (2003-07-04) |
Re: Generating JIT compilers lex@cc.gatech.edu (Lex Spoon) (2003-07-04) |
Re: Generating JIT compilers bonzini@gnu.org (2003-07-04) |
Re: Generating JIT compilers jens.troeger@light-speed.de (Jens Troeger) (2003-07-13) |
Re: Generating JIT compilers bonzini@gnu.org (2003-07-17) |
Re: Generating JIT compilers j.troeger@qut.edu.au (Jens Troeger) (2003-07-21) |
From: | bonzini@gnu.org (Paolo Bonzini) |
Newsgroups: | comp.compilers |
Date: | 4 Jul 2003 00:10:22 -0400 |
Organization: | http://groups.google.com/ |
References: | 03-07-008 |
Keywords: | design |
Posted-Date: | 04 Jul 2003 00:10:22 EDT |
[please don't capitalize like this]
> I Think I Will Go For The Template Approach First, I.E. To
> Generate A Static Mapping From Source To Target Instructions,
> Which Is Used At Runtime To Emit The Target Instructions.
> But Before I Reinvent The Wheel... Is Anybody Aware Of Such
> Work?
The template approach is used in many different sauces:
1) Generate a mapping from source language to assembly, without any
hope of retargeting. See Ian Piumarta's ccg (google for it).
2) Generate a mapping from source language to an intermediate generic
assembly language, and then from this to a variety of assembly
languages. See my own GNU lightning and Dawson Engler's vcode.
3) A cool approach (but I don't have performance data) is to map from
source language to C and then parse the executable to obtain good
assembly templates. See Fabrice Bellard's qemu.
> At The Moment I Tinker Around With Specifications, And How
> An Instruction Selector For A JIT Compiler Could Be Generated.
Apart from template based, you can try a very simple maximal munch
algorithm.
HTH,
Paolo
Return to the
comp.compilers page.
Search the
comp.compilers archives again.