Path: utzoo!attcan!uunet!portal!cup.portal.com!bcase From: bcase@cup.portal.com (Brian bcase Case) Newsgroups: comp.arch Subject: Re: object <-> object translation (was Re: VLIW) Message-ID: <11560@cup.portal.com> Date: 20 Nov 88 20:50:48 GMT References: <3386@pt.cs.cmu.edu> <74435@sun.uucp> <70@armada.UUCP> <550@m3.mfci.UUCP> <2152@ficc.uu.net> <552@m3.mfci.UUCP> <76500@sun.uucp> <10643@tekecs.TEK.COM> <8523@wright.mips.COM> Organization: The Portal System (TM) Lines: 37 WRT to object-object compilation: >MIPS has done it twice, once translating MIPS code to VAX code (in the >early days before MIPS hardware) and once translating MIPS code to >MIPS code (used for profiling (shipped as part of the compiler >suite)). The hardest part is dealing with the environment, even when >translating from MIPS->MIPS! Earl, you translated MIPS *binary* code to VAX and MIPS *binary* code to MIPS? I thought it was MIPS assembly code.... How did you deal with the jump tables associated with switch statements? What strategy did you use for other indirect branches (e.g., returns)? >By the way, MIPS machine code is particularly easy to translate to >other machine code because the instructions are fixed size (fairly >common these days) and tend to be single-purpose, i.e. not lots of >useless side effects (still uncommon today). Yeah, but try it for a 68K or VAX or 386. It is hard to tell code from data. I have "done" object-object code translation three times now (actually built two monsters and spec'd a third). The easiest is when a RISC is the source: at least then you can compile areas of the object image that look like data but might be code in a reliable way: if you translate some data as code, you've only done extra work and increased the size of the image on disk, but at least it's bullet-proof. WRT to comments made about the Phoenix and Insignia Solutions' "solutions" to this problem: they are interpreters, perhaps incrementally-compiling interpreters, but interpreters nontheless. The Hunter Systems' approach is the only true, static compiler of which I know. At last the count, the Insignia solutions ran applications in close to real time on a SUN-3 if you consider PC-XT speed real time (they might have improved this significantly since I last saw a demo). Hunter Systems' stuff runs at something like 80386 speed on a SUN-3. Of course, the Hunter Systems' stuff requires some up-front, human labor to create key files.