ccg
: dynamic code generation for C
and C++
This document contains brief notes on ``ccg
'', a combination of preprocessor and ``runtime assembler'' for C
and C++
programs.
It allows extremely efficient dynamic code generation for PowerPC, Sparc and Pentium to be embedded in arbitrary C
programs.
Dynamically generated code is specified using the standard assembler syntax of the target platform, with extensions to allow C
expressions to appear in operands.
The program can therefore ``specialize'' all aspects of the generated code at runtime: literal operands, register selection, jump/branch destinations, elements of complex addressing modes, and so on.
The system is written entirely in ANSI C
, and requires no compiler-specific extensions (such as inline asm
statements or the various assembler-related extensions implemented by gcc
).
This document is also available in PostScript and PDF.
Version 1.0alpha is now available for download: ccg-1.0a.tgz (gzipped tar archive).
ccg
ccg
with make
ccg
's behaviourLast modification on: Sun May 01 2004 - 22:46:07