Retargeting

The history of this idea dates back to the 1950s when UNCOL was proposed as the universal intermediate language.

Some retargetable compilers, e.g., GCC, became so widely ported and developed that they now include support for many optimizations and machine specific details that the quality of code often surpasses that of non-retargetable compilers on many CPUs.

[1] The optimization of code for some high performance processors requires a detailed and specific knowledge of the architecture and how the instructions are executed.

Unless developers invest the large amount of time necessary to write a code generator specifically for an architecture, the optimizations performed by a retargetable compiler will only be those applicable to generic processor characteristics.

[citation needed] Conversely, retargetable assemblers are capable of generating object files of different formats, which is useful in porting assembly language programs to various operating systems that run on the same CPU architecture (such as Windows and Linux on the x86 platform).