Related articles |
---|
Assembly code to 3-address code(IR)... dave.tw@gmail.com (s88) (2006-10-03) |
Re: Assembly code to 3-address code(IR)... niktechc@niktech.com (Sandeep Dutta) (2006-10-19) |
From: | "Sandeep Dutta" <niktechc@niktech.com> |
Newsgroups: | comp.compilers |
Date: | 19 Oct 2006 11:16:22 -0400 |
Organization: | Compilers Central |
References: | 06-10-010 |
Keywords: | assembler, question |
Posted-Date: | 19 Oct 2006 11:16:22 EDT |
Hi Dave,
> I'm finding a way to transfer the ARM assembly code into the
> 3-address code (Intermediate code).
> Does anyone has any idea?
This is not that difficult for a typical load/store RISC architecture.
You will need to keep track of the stack, and of arguments being passed in.
ARM has some additional challenges,
*) Almost all instructions can have conditional postfixes , this means
either your 3-address intermediate form have to have them as well, or
you would need to translate them into if-then-else.
*) The PC (R15) can be the destination in many instructions which means
implied branches
*) The last operand can be shifted or rotated, again this can be
represented in your IR or has to be split into two (with a temp
variable).
Hope that helps.
Sandeep
http://www.niktech.com
Return to the
comp.compilers page.
Search the
comp.compilers archives again.