|CISC to RISC translator? Mikael.Larsson@lu.erisoft.se (1994-08-16)|
|Re: CISC to RISC translator? roedy@BIX.com (1994-08-18)|
|Re: CISC to RISC translator? firstname.lastname@example.org (1994-08-18)|
|Re: CISC to RISC translator? email@example.com (1994-08-18)|
|Re: CISC to RISC translator? firstname.lastname@example.org (1994-08-19)|
|Re: CISC to RISC translator? email@example.com (1994-08-24)|
|From:||firstname.lastname@example.org (Dave Hayden)|
|Date:||Thu, 18 Aug 1994 19:52:45 GMT|
Mikael.Larsson@lu.erisoft.se (Mikael Larsson) writes:
[re how practical is it to translate CISC object code to RISC]
Could anyone explain to me why this isn't possible or where the main
>difficulties are? Does anyone have any references to the work by DEC?
>If it can be done, in what steps should it then preferrably be performed?
>I've heard of disassemblers. What is the output format of a disassembler?
>Could the output of a disassembler be used as input for generating code
>for another architecture? Does anyone know of any tools that could be used
>to build a code translator?
>[The Vax to Alpha translator is real and apparently works quite well. An
>important reason for that is that the Alpha uses the same data formats, so
>you don't have to do byte swapping and the like. x86 emulators like Insignia's
>are apparently compilers as well, compiling chunks on the fly. In many cases,
>particularly DOS x86 systems, emulating the environment (devices, interrupts,
>and the like) is harder than translating the actual code., -John]
We (Flashport Products and Services group at AT&T Bell Labs, formerly
Echo Logic, Inc.) make various translators that do just this. We
currently have 68k->RISC and IBM 370->RISC. By "RISC," I mean Sparc,
PowerPC and HP-PA.
To my knowledge, ours is the only system that does the entire
translation at "compile" time. The VAX->Alpha translator keeps an
image of the original program in the translated version and punts to
emulation mode when it gets confused by the flow of control.
The problem is harder than Mikael Larsson indicates. For example, how
can you be sure of what is code and what is instructions? You can disassemble
some things easily but what do you do when you see something like JMP %a0 ?
Also, when you see a constant, is it a value or an address? If an
address, what should the corresponding address be in the translated code?
Finally, most instructions in a CISC machine have all sorts of side effects
(like setting a ton of condition codes). These are ignored sometimes and
critical at other times. What should the translated code do with them?
Our translator effectively deals with these and other problems to
create code that's very competitive with a hand port. In some cases,
our translated code is actually faster and smaller than code resulting
from a recompile on the target machine!
Return to the
Search the comp.compilers archives again.