C––, portable assembly language

C–– is a “portable assembly language” — a target language for compiler backends that can compile into native code on several platforms. It is implemented in OCaml and appears sufficiently general to handle a wide range of language features: for example, all values are untyped strings of bits, multiple return values are possible, and tail call optimization is readily available. C–– also supports a run-time interface, so that one may use implementations of support code that are most suitable for a given language.

There are code generators for x86, PPC, IA-64, SPARC, MIPS, ARM, and Alpha. According to the web page, as of July 2003, the x86 backend is reasonably mature, whereas the rest are under development.

Thanks to Kent Hunter for the pointer.

Leave a Reply