Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 136,578 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,928 people online right now. Registration is fast and FREE... Join Now!




Conversion of C code into RTL Code

 
Reply to this topicStart new topic

Conversion of C code into RTL Code

nikki123
28 Sep, 2008 - 12:04 AM
Post #1

New D.I.C Head
*

Joined: 10 Aug, 2008
Posts: 5

What is RTL code.How can we convert a given C file into RTL code.
i have an assignment of conversion of C code into RTL code using C++.but i do not know anything about RTL code.if anyone knows about the RTL code,please help me.
User is offlineProfile CardPM
+Quote Post

Satan.inc
RE: Conversion Of C Code Into RTL Code
28 Sep, 2008 - 04:16 AM
Post #2

New D.I.C Head
*

Joined: 26 Sep, 2008
Posts: 6

QUOTE(nikki123 @ 28 Sep, 2008 - 01:04 AM) *

What is RTL code.How can we convert a given C file into RTL code.
i have an assignment of conversion of C code into RTL code using C++.but i do not know anything about RTL code.if anyone knows about the RTL code,please help me.




Hey nikki ! just WIKI yar!! biggrin.gif

"In computer science, register transfer language (RTL) is a term used to describe 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, and several other compilers, such as Zephyr"

RTL code is just an generic assebly representation of any code rolleyes.gif Good enough to write theories!!! smile.gif
For example consider GCC's RTL is usually written in a form which looks like a Lisp S-expression:

(set:SI (reg:SI 140) (plus:SI (reg:SI 138) (reg:SI 139)))
This "side-effect expression" says "add the contents of register 138 to the contents of register 139 and store the result in register 140."



User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/3/08 12:19AM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month