Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Register transfer language
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
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|A programming language for register-register data flow}} {{Distinguish|Register-transfer level}} {{more references|date=September 2017}} In [[computer science]], ''' register transfer language''' ('''RTL''') is a kind of [[intermediate representation]] (IR) that is very close to [[assembly language]], such as that which is used in a [[compiler]]. It is used to describe data flow at the [[register-transfer level]] of an [[computer architecture|architecture]].<ref>{{Cite journal |last=Mahani |first=Negin |date=2013-01-16 |title=Making alive register transfer level and transaction level modeling in Ada |journal=ACM SIGAda Ada Letters |volume=32 |issue=2 |pages=9β16|doi=10.1145/2429574.2429576 |url=https://dl.acm.org/doi/abs/10.1145/2429574.2429576 |access-date=September 8, 2024}}</ref> Academic papers and textbooks often use a form of RTL as an architecture-neutral assembly language. '''RTL''' is used as the name of a specific intermediate representation in several compilers, including the [[GNU Compiler Collection]] (GCC), Zephyr, and the European compiler projects CerCo and [[CompCert]]. ==History== {{Expand section|date=January 2011}} The idea behind RTL was first described in ''The Design and Application of a Retargetable Peephole Optimizer''.<ref>{{cite web| url = http://www.well.com/~cwf/pro/Davidson%20and%20Fraser.%20The%20design%20and%20application%20of%20a%20retargetable%20peephole%20optimizer.pdf| title = Davidson and Fraser; ''The Design and Application of a Retargetable Peephole Optimizer''; ToPLaS v2(2) 191-202 (April 1980)}}</ref> === GCC === In GCC, RTL is generated from the [[GIMPLE]] representation, transformed by various passes in the GCC [[compiler middle end|middle-end]], and then converted to assembly language. GCC's RTL is usually written in a form that looks like a [[Lisp (programming language)|Lisp]] [[S-expression]]: <syntaxhighlight lang="scheme"> (set (reg: SI 140) (plus:SI (reg:SI 138) (reg: SI 139))) </syntaxhighlight> This [[side effect (computer science)|side-effect expression]] says "sum the contents of register 138 with the contents of register 139 and store the result in register 140". The SI specifies the access mode for each register. In the example, it is "SImode", i.e. "access the register as 32-bit integer". The sequence of RTL generated has some dependency on the characteristics of the processor for which GCC is generating code. However, the meaning of the RTL is more or less independent of the target: it would usually be possible to read and understand a piece of RTL without knowing what processor it was generated for. Similarly, the meaning of the RTL doesn't usually depend on the program's original high-level language. A register transfer language is a system for expressing in symbolic form the microoperation sequences among the registers of a digital module. It is a convenient tool for describing the internal organization of digital computers in a concise and precise manner. It can also be used to facilitate the design process of digital systems.<ref>{{Cite book|last=Mano|first=Morris M.|title=Computer System Architecture|publisher=Prentice Hall|year=1992|isbn=0131755633|pages=94|edition=3rd}}</ref> ==References== {{Reflist}} == External links == * [https://gcc.gnu.org/onlinedocs/gccint/RTL.html Register Transfer Language of GCC] {{DEFAULTSORT:Register Transfer Language}} [[Category:Compiler structures]]
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Cite book
(
edit
)
Template:Cite journal
(
edit
)
Template:Cite web
(
edit
)
Template:Distinguish
(
edit
)
Template:Expand section
(
edit
)
Template:More references
(
edit
)
Template:Reflist
(
edit
)
Template:Short description
(
edit
)
Search
Search
Editing
Register transfer language
Add topic