Re: New assembly language instructions to support OO languages?

Chris Gray <cg@graysage.com>
04 Dec 2008 17:23:34 -0700

          From comp.compilers

Related articles
New assembly language instructions to support OO languages? tony@my.net (Tony) (2008-12-04)
Re: New assembly language instructions to support OO languages? bert.hutchings@btinternet.com (bert) (2008-12-04)
Re: New assembly language instructions to support OO languages? tmk@netvision.net.il (Michael Tiomkin) (2008-12-04)
Re: New assembly language instructions to support OO languages? cg@graysage.com (Chris Gray) (2008-12-04)
Re: New assembly language instructions to support OO languages? gah@ugcs.caltech.edu (Glen Herrmannsfeldt) (2008-12-04)
Re: New assembly language instructions to support OO languages? DrDiettrich1@aol.com (Hans-Peter Diettrich) (2008-12-05)
Re: New assembly language instructions to support OO languages? DrDiettrich1@aol.com (Hans-Peter Diettrich) (2008-12-05)
Re: New assembly language instructions to support OO languages? jasen@xnet.co.nz (Jasen Betts) (2008-12-05)
Re: New assembly language instructions to support OO languages? tony@my.net (Tony) (2008-12-05)
Re: New assembly language instructions to support OO languages? tony@my.net (Tony) (2008-12-05)
[31 later articles]
| List of all articles for this month |
From: Chris Gray <cg@graysage.com>
Newsgroups: comp.compilers,comp.arch
Date: 04 Dec 2008 17:23:34 -0700
Organization: Gray Sage Holdings
References: 08-12-014 08-12-016
Keywords: architecture, OOP, comment
Posted-Date: 04 Dec 2008 19:34:01 EST

bert <bert.hutchings@btinternet.com> writes:


> On 4 Dec, 18:09, "Tony" <t...@my.net> wrote:
> > To me, it seems like "reducing everything to a function" may be a bit
> > dated given that OO languages are the thing nowadays. Can anyone
> > imagine any new potential assembly language instructions that would
> > make implemention of OO languages easier? (Not just necessarily the
> > function thing, but anything).


Well, its not a real machine, but here's an opcode description from my
current bytecode system:


        bc_gmeth, /* Get METHod. The top-of-stack is the reference to an
interface or capsule. The method vector is loaded
from offset 16 in the interface or capsule. Then,
the single 16 bit argument is added to the vector
address, and the actual method reference is loaded
from there. */


I can't see it being worth adding to a real CPU, however - it would
pipeline badly (two serialized fetches) and is trivial to build out of
existing instructions.


> [Indirect addressing was quite common through the 1970s. The PDP-11
> and VAX had it. But I gather that it's a challenge to implement
> efficiently, and if the machine has a lot of registers, it doesn't gain
> you much. -John]


Eh? I'm pretty sure the PDP-11 did not have an indirect bit. The PDP-8
or PDP-7 may have. I don't think the PDP-9 did, but I'm hazy on that one.
One machine I know has it is the Tera MTA (their earlier custom processor,
not the Opterons they use nowadays).


[The PDP-4, -5, -7, -8, -9, -11, and -15 had one-level indirect
addressing with the indirect bit in the instruction. The -6 and -10
had multilevel indirection with an indirect bit in both the
instruction and the address words. On the -6 and -10 the address was
considerably shorter than the word size. I did various tricky things
with indirect chains on the -10, although I doubt they'd perform well
on a modern machine with caches and pipelines. -John]


Post a followup to this message

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