Skip to main content

A Language for Writing Code Generators

21 June 1989

New Image

A new programming language allows concise expression of the machine-specific details from a conventional, hand-written code generator: a specification for the VAX takes 126 lines, and one for the Motorola 68020 takes 156. Each specification is compiled into a fast, monolithic program that accepts dags annotated with intermediate code, and generates, optimizes, and emits code for the target machine. A production compiler for ANSI C uses these code generators. It emits code similar to PCC1's but it runs about twice as fast.