We describe a method designed to significantly reduce the effort required to retarget a compiler to a new architecture, while at the same time producing fast and effective compilers. The basic idea is to use the native C compiler at compiler construction time to discover architectural features of the new architecture. From this information a formal machine description is produced. Given this machine description, a native code-generator can be generated by a back-end generator such as BEG or burg. A prototype automatic Architecture Discovery Tool (called ADT) has been implemented. This tool is completely automatic and requires minimal input from the user. Given the Internet address of the target machine and the command-lines by which the native C compiler, assembler, and linker are invoked, ADT will generate a BEG machine specification containing the register set, addressing modes, instruction set, and instruction timings for the architecture. The current version of ADT is general enough to produce machine descriptions for the integer instruction sets of common RISC and CISC architectures such as the Sun SPARC, Digital Alpha, MIPS, DEC VAX and Intel x86.
|Original language||English (US)|
|Number of pages||40|
|Journal||ACM Transactions on Programming Languages and Systems|
|State||Published - Jul 2002|
- D.2.7 [Software Engineering]: Distribution, Maintenance, and Enhancement - Portability
- D.3.2 [Programming Languages]: Language Classifications - Macro and assembly languages
ASJC Scopus subject areas