fbpx
Wikipedia

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. It is used to describe data flow at the register-transfer level of an architecture. 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 edit

The idea behind RTL was first described in The Design and Application of a Retargetable Peephole Optimizer.[1]

GCC edit

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 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 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.[2]

References edit

  1. ^ "Davidson and Fraser; The Design and Application of a Retargetable Peephole Optimizer; ToPLaS v2(2) 191-202 (April 1980)" (PDF).
  2. ^ Mano, Morris M. (1992). Computer System Architecture (3rd ed.). Prentice Hall. p. 94. ISBN 0131755633.

External links edit

  • Register Transfer Language of GCC

register, transfer, language, confused, with, register, transfer, level, this, article, needs, additional, citations, verification, please, help, improve, this, article, adding, citations, reliable, sources, unsourced, material, challenged, removed, find, sour. Not to be confused with Register transfer level This article needs additional citations for verification Please help improve this article by adding citations to reliable sources Unsourced material may be challenged and removed Find sources Register transfer language news newspapers books scholar JSTOR September 2017 Learn how and when to remove this template message 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 architecture 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 Contents 1 History 1 1 GCC 2 References 3 External linksHistory editThis section needs expansion You can help by adding to it January 2011 The idea behind RTL was first described in The Design and Application of a Retargetable Peephole Optimizer 1 GCC edit 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 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 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 2 References edit Davidson and Fraser The Design and Application of a Retargetable Peephole Optimizer ToPLaS v2 2 191 202 April 1980 PDF Mano Morris M 1992 Computer System Architecture 3rd ed Prentice Hall p 94 ISBN 0131755633 External links editRegister Transfer Language of GCC Retrieved from https en wikipedia org w index php title Register transfer language amp oldid 1156127435, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.