Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84 SMI; site sun.uucp
Path: utzoo!linus!decvax!decwrl!sun!guy
From: guy@sun.uucp (Guy Harris)
Newsgroups: net.micro.68k,net.micro.16k
Subject: Re: Re: PDP11s vs the micros
Message-ID: <2607@sun.uucp>
Date: Sun, 11-Aug-85 16:50:17 EDT
Article-I.D.: sun.2607
Posted: Sun Aug 11 16:50:17 1985
Date-Received: Wed, 14-Aug-85 00:33:55 EDT
References: <1617@hao.UUCP> <847@mako.UUCP> <2422@sun.uucp>
Organization: Sun Microsystems, Inc.
Lines: 47
Xref: linus net.micro.68k:994 net.micro.16k:333

> > As for eliminating auto +/- addressing mode, I support that decision.
> > Given their decision to "back out" instructions that get page faults
> > rather than dump out the internal microstate like the 68010, National
> 
> Any particular reason to do this rather than restart the instruction from
> where it left off?

Less internal state to dump?  (Which means less microcode/whatever to do the
dumping and restoring, and less code in the kernel to check that the state,
if accessible to the user, hasn't been tampered with.)

> I hadn't heard of this approach... what does the Vax do? What are the
> tradeoffs.

The VAX has a "first part done" bit in the PSL.  Presumably, instructions
which have side-effects and where a page fault can occur after the
side-effect occur set the "first part done" bit after the side-effects
occur.  This is a simpler version of the "dump the internal microstate"
model.  The PDP-11 (at least the ones with the fancier MMUs) backs out the
instruction in software - it dumps the numbers of the registers which have
been auto-incremented or auto-decremented, and the amount they've been
auto-incremented or auto-decremented by, into a register which is used by
the trap handler to actually back the auto-ID out.

Some VAX instructions, like the string instructions, require more hair.  In
that case they hijack several registers and store the current pointers and
lengths into them if the instruction takes a fault and is interrupted.
Presumably the FPD bit says that the pointers and lengths should be taken
from the registers instead of from the instruction's operands.

> > I think having full memory to memory addressing is more
> > useful that auto +/-, especially for compiler generated code.  (well
> > maybe not for pcc -- it's model seems to be put something in a
> > register, munch on it, put it back in memory).

> register char **av;
> {
> 	while(*++av) {
> 
> Not an uncommon case construction in 'C'.

Not uncommon, but it doesn't generate autoincrement code on the PDP-11, VAX,
or M68000, because they all have only predecrement and postincrement modes -
this construct would require a preincrement mode.  Do any machines have
preincrement addressing modes?

	Guy Harris