Home

C--: A portable assembly language


Author(s) : Thomas Nordin Simon Peyton Jones Dino Oliva, 
Publisher : N/A
Publication Date : 1998
ISSN : N/A
Abstract : Abstract. Of late it has become very common for research compilers to emit C as their target code, relying on a C compiler to generate machine code. In e ect, C is being used as a portable compiler target language. It o ers a simple and e ective way of avoiding the need to re-implement e ective register allocation, instruction selection, and instruction scheduling, and so on, all for a variety of target architectures. The trouble is that C was designed as a programming language not as a compiler target language, and is not very suitable for the latter purpose. The obvious thing to do is to de ne a language that is designed as a portable target language. This paper describes C--, a portable compiler target language, or assembler. C-- has to strike a balance between being high-level enough to allow the back end a fair crack of the whip, while being low level enough to give the front end the control it needs. It is not clear that a path exists between these two rocks ? the ghost of UNCOL lurks ominously in the shadows [6]. Yet the increasing popularity of C as a compiler target language (despite its unsuitability) suggests strong demand, and provides an existence proof that something useful can be done.,