kirancodes.me
To Proof Maintenance & Beyond!

Finite-Static Code Generation

Christopher W. Fraser, Todd A. Proebsting

Abstract

This paper describes gburg, which generates tiny, fast code generators based on finite-state machine pattern matching. The code generators translate postfix intermediate code into machine instructions in one pass (except, of course, for backpatching addresses) . A stack-based virtual machine---known as the Lean Virtual Machine (LVM)---tuned for fast code generation is also described. Gburg translates the two-page LVM-to-x86 specification into a code generator that fits entirely in an 8 KB I-cache and that emits x86 code at 3.6 MB/sec on a 266-MHz P6. Our just-in-time code generator translates and executes small benchmarks at speeds within a factor of two of executables derived from the conventional compile-time code generator on which it is based. 1 Introduction To execute virtual machine (VM) code on a client processor typically requires either a VM interpreter or a just-in-time (JIT) translator. Conventional wisdom dictates that the space/time tradeo# favors the interpreter approac...

Related papers