World Library  
Flag as Inappropriate
Email this Article

Register Transfer Language

Article Id: WHEBN0000026344
Reproduction Date:

Title: Register Transfer Language  
Author: World Heritage Encyclopedia
Language: English
Subject: GNU Compiler Collection, Instruction set, Reference desk/Archives/Computing/2010 August 23, Object code, Irving S. Reed
Publisher: World Heritage Encyclopedia

Register Transfer Language

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. Academic papers and textbooks also often use a form of RTL as an architecture-neutral assembly language. RTL is also the name of a specific IR used in the GNU Compiler Collection (GCC), and several other compilers, such as Zephyr[1] or the European compiler projects CerCo[2] and CompCert.[3]


In GCC, RTL is generated from the GIMPLE representation, transformed by various passes in the GCC 'middle-end', and then converted to assembly language.

GCC's RTL is usually written in a form which looks like a Lisp S-expression:

(set (reg:SI 140)
     (plus:SI (reg:SI 138)
              (reg:SI 139)))

This "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 registers. 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 original high-level language of the program.

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 concise and precise manner. It can also be used to facilitate the design process of digital systems.


The idea behind RTL was first described in: Davidson and Fraser; The Design and Application of a Retargetable Peephole Optimizer; ToPLaS v2(2) 191-202 (April 1980)

See also


  1. ^ Zephyr Code-Generation Interfaces
  2. ^ CerCo - Certified Complexity
  3. ^ Module RTL - CompCert

External links

  • Register Transfer Language of GCC
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.