Re: Machine language and assembler translators?

vtsikoza@yahoo.com (Vit)
23 Jun 2005 21:54:29 -0400

          From comp.compilers

Related articles
Machine language and assembler translators? jatinb@noida.hcltech.com (Jatin Bhateja, Noida) (2005-06-21)
Re: Machine language and assembler translators? vtsikoza@yahoo.com (2005-06-23)
Re: Machine language and assembler translators? DrDiettrich@compuserve.de (Hans-Peter Diettrich) (2005-06-23)
Re: Machine language and assembler translators? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2005-06-23)
Re: Machine language and assembler translators? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2005-06-26)
Re: Machine language and assembler translators? vtsikoza@yahoo.com (2005-06-30)
Re: Machine language and assembler translators? jcrens@earthlink.net (Jack Crenshaw) (2005-07-17)
Re: Machine language and assembler translators? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2005-07-22)
[9 later articles]
| List of all articles for this month |

From: vtsikoza@yahoo.com (Vit)
Newsgroups: comp.compilers
Date: 23 Jun 2005 21:54:29 -0400
Organization: http://groups.google.com
References: 05-06-103
Keywords: translator, comment
Posted-Date: 23 Jun 2005 21:54:29 EDT

> Now my personal view is that all the above work can also be achieved
> by using a cross complier but for that we have to make the changes in
> the complier backend. Instead of doing that cant we make a tool which
> convert the assembly language of one architecture to another
> architecture machine language.


I doubt it is a reasonable idea. If you wish just to port the code so
that it just works on another platform, then it is theoretically
possible (though it may take less efforts to write an emulator). If
you wish to gain a reasonable performance, then avoiding back-end's
work is impossible.


Optimizing compilers do a lot of hi-tech work on allocating data on
registers, selecting better instructions, scheduling them for better
performance, etc. Suppose you do a conversion from platform with N
registers to a platform with M<N registers. How will you deal with
lacking registers? Spill them to memory? into stack? load and unload
from time to time? The work seems to be compared with fighting in a
can...


Vit
http://www.excelsior-usa.com
[People have been translating assembler and machine code for 40 years.
Since the target is usually a newer machine than the source,
sufficient registers et al aren't usually a problem. Incompatible
data formats and byte orders, though ... -John]


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.