Diff between 11/20 and 11/45?
Carl Lowenstein
cdl at mpl.ucsd.edu
Wed Sep 8 14:43:16 AEST 1999
> From owner-pups at minnie.cs.adfa.edu.au Tue Sep 7 18:24 PDT 1999
> Date: Tue, 7 Sep 1999 17:49:36 -0700 (PDT)
> From: "Steven M. Schultz" <sms at moe.2bsd.com>
> To: pups at minnie.cs.adfa.edu.au
> Subject: Re: Diff between 11/20 and 11/45?
>
> > From: Carl Lowenstein <cdl at mpl.ucsd.edu>
> >
> > MOV SP, -(SP)
>
> Similarily
>
> MOV R0,(R0)+
>
> won't work as expected on some 11s. I suspect that the even less
> likely case of "mov pc,-(pc)" won't work either :-)
>
> > It isn't really clear to me why one would want to use this particular
> > instruction, however it turned out to hang both BASIC and FOCAL at the
>
> Fairly common when setting up call frames, etc. You want the
> address of where the arguments start and since they're pushed on the
> stack 'sp' is the value you want.
>
> There's a comment in 2BSD (I think it came from V7) where mention is
> made that "we can't do sp,-(sp) because it won't work on the 11/40".
>
> > time. A zero-length patch wasn't too hard to figure out.
>
> Hmmm, interesting. The workaround I saw took an extra instruction.
Abbreviated due to fading memory over the years, but refreshed by some
of the current discussion. The patch was zero-length but involved more
than the one instruction. Something similar to:
MOV SP, -(SP) MOV SP, R0
MOV (sP), R0 MOV R0, -(SP)
The net result being that the initial value of SP is now both in R0 and
on the stack. Without doing both a SRC and DST operation on SP in the
same instruction, which is the thing that is incompatible across different
processor hardware.
carl
Received: (from major at localhost)
by minnie.cs.adfa.edu.au (8.9.3/8.9.3) id OAA04681
for pups-liszt; Wed, 8 Sep 1999 14:51:11 +1000 (EST)
More information about the TUHS
mailing list