Path: utzoo!utgpu!attcan!uunet!seismo!sundc!pitstop!sun!decwrl!labrea!rutgers!mailrus!utah-gr!uplherc!esunix!bpendlet From: bpendlet@esunix.UUCP (Bob Pendleton) Newsgroups: comp.arch Subject: Re: Software Distribution Message-ID: <965@esunix.UUCP> Date: 1 Sep 88 14:24:48 GMT References: <22778@amdcad.AMD.COM> Organization: Evans & Sutherland, Salt Lake City, Utah Lines: 49 From article <22778@amdcad.AMD.COM>, by rpw3@amdcad.AMD.COM (Rob Warnock): > The thought occurs that if one designed a virtual "machine" that was > specifically easy to emulate -- given these modern techniques -- that > this *might* be a suitable form for "portable" object programs (as > contrasted with some "universal intermediate form"). At least it bears > some thought. There really is no difference between an easy to emulate virtual machine and an universal intermediate form. Quads map directly to a 3 address machine, reverse polish maps to a stack machine, and trees can also be directly executed. (EVAL in microcode anyone? Yes, I know its been done.) If the intension is to translate it for the target machine anyway, why not use a form with as much information left in as possible? The problems come from incompatable data formats, addressing modes, and high level operations. Most modern computers use 8 bit bytes and support 16 and 32 bit twos complement integers so there isn't much of a problem there. Floating point, packed decimal, and fixed point might cause some problems. Not all modern computers are byte addressable, so virtual machine code that assumes byte adressablitiy isn't going to run well on a word addressed machine. Also, if the virtual machine code lays out data in structures and arrays you can take a serious performance hit if the virtual machine doesn't allign data to match the addressing granularity of your machine. If the virtual machine is specified at too low a level it will be very difficult to take advantage of any special instructions the target processor may have. Even something as simple as a block copy instruction may not be usable if the virtual machine code has loops to do copies. So, if you have an universal intermediate language, you can write an emulator for it and execute it with a minimal amount of preprocessing, or you can convert it native machine code, or you can build a machine that directly executes it. > Rob Warnock > Systems Architecture Consultant -- Bob Pendleton @ Evans & Sutherland UUCP Address: {decvax,ucbvax,allegra}!decwrl!esunix!bpendlet Alternate: utah-cs!esunix!bpendlet I am solely responsible for what I say.