Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Retargeting
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|Attribute of multi-platform software development tools}} {{About|software development tools|the Internet marketing term|behavioral 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 different [[CPU]] [[instruction set architecture]]s. The history of this idea dates back to the 1950s when [[UNCOL]] was proposed as the universal intermediate language. The Pascal [http://www.software.ac.uk/blog/2013-08-19-heroes-software-engineering P-compiler] is an example of an early widely used retargetable compiler. The cost of producing a retargetable compiler that generates code of similar quality to a non-retargetable compiler (i.e., one designed to only ever produce code for a single processor) is higher because it is not possible to make use of cpu specific details throughout all phases of compilation. The benefits of a retargetable compiler is that the total cost over multiple CPUs is much lower than the combined cost of many individual non-targetable compilers. Some retargetable compilers, e.g., [[GNU Compiler Collection|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. A general-purpose global optimizer followed by machine-specific [[peephole optimization]] is a commonly used implementation technique.<ref>[http://www.well.com/~cwf/pro/Davidson%20and%20Fraser.%20The%20design%20and%20application%20of%20a%20retargetable%20peephole%20optimizer.pdf Davidson and Fraser; The Design and Application of a Retargetable Peephole Optimizer; ToPLaS v2(2) 191-202 (April 1980)]</ref> 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. A retargetable compiler is a kind of [[cross compiler]]. Often (but not always) a retargetable compiler is [[software portability|portable]] (the compiler itself can run on several different CPUs) and [[Self-hosting (compilers)|self-hosting]]. Examples of retargetable compilers: *[[GNU Compiler Collection|GCC]] *[[Amsterdam Compiler Kit|ACK]] *[[Little C compiler|lcc]] *[[VBCC]] *[[Portable C Compiler]] *[[Small Device C Compiler|SDCC]] *[[LLVM]] * The [[Small-C]] compiler * MPG, the "machine-independent efficient microprogram generator"<ref> Rainer Leupers, Peter Marwedel. [https://books.google.com/books?id=P_oBnK5xkywC "Retargetable Compiler Technology for Embedded Systems"]. 2001. ({{ISBN|0-7923-7578-5}}) p. 63. </ref> ==Decompiler== [[retdec]] ("Retargetable Decompiler") is an [[open source]] retargetable [[machine-code]] [[decompiler]] based on [[LLVM]].{{fact|date=April 2021}} * The decompiler is not limited to any particular target architecture, operating system, or executable file format: * Supported file formats: ELF, PE, Mach-O, COFF, AR (archive), Intel HEX, and raw machine code. * Supported architectures (currently 32bit only): Intel x86, ARM, MIPS, PIC32, and PowerPC. ==Assemblers== Conversely, retargetable assemblers are capable of generating [[object files]] of different formats, which is useful in porting [[assembly language]] programs to various [[operating system]]s that run on the same [[CPU architecture]] (such as [[Microsoft Windows|Windows]] and [[Linux]] on the [[x86]] platform). [[Netwide Assembler|NASM]] is one such assembler. ==Further reading== *''A Retargetable C Compiler: Design and Implementation'' ({{ISBN|0-8053-1670-1}}) == References == {{Reflist}} ==External links== * [https://www.lancecompiler.com/ LANCE compiler website] * [https://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] * [https://retdec.com/ RetDec website] [[Category:Compilers]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:About
(
edit
)
Template:Fact
(
edit
)
Template:ISBN
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)