- Retargeting
In
software engineering , retargeting is an attribute of software development tools that have been specifically designed to generate code for more than one computing platform.Compilers
A retargetable compiler is a
compiler that has been designed to be relatively easy to modify to generate code for differentCPU architectures. Themachine code produced by these is sometimes of lower quality than that produced by a compiler developed specifically for a single processor.The goal of easily retargeting the compiler conflicts to some degree with the goal of providing fast execution and small code size. The optimization of code for some high performance processors requires a detailed and specific knowledge of the architecture and how the instructions are executed. The optimizations usually done by a retargetable compiler are only those applicable to any processor. This is unless developers have taken the large amount of time necessary to write a code generator specifically for an architecture.
Examples of retargetable compilers:
*GCC
*ACK
*lcc
*VBCC
*SDCCAssemblers
Conversely, retargetable assemblers are capable of generating
object files of different formats, which is useful in portingassembly language programs to variousoperating system s that run on the sameCPU architecture (such as Windows andLinux on thex86 platform). NASM is one such assembler.Further reading
*"A Retargetable C Compiler: Design and Implementation" (ISBN 0-8053-1670-1)
*"Retargetable Compiler Technology for Embedded Systems" (ISBN 0-7923-7578-5)External links
* [http://www.lancecompiler.com/ LANCE compiler website]
* [http://www.llvm.org The LLVM compiler infrastructure website]
* [http://tack.sourceforge.net The (open-source) ACK sourceforge page]
* [http://nwcc.sourceforge.net Nils Weller's C compiler page]
Wikimedia Foundation. 2010.