[Info-vax] Native compilers

chris chris-nospam at tridac.net
Tue Mar 8 17:29:47 EST 2022


On 03/08/22 21:10, Johnny Billquist wrote:
> On 2022-03-08 20:50, chris wrote:
>> On 03/08/22 15:10, John Reagan wrote:
>>> On Monday, March 7, 2022 at 7:46:02 PM UTC-5, chris wrote:
>>>> On 03/05/22 18:05, John Reagan wrote:
>>>>> MOVAL (R3)+,(R3)+
>>>> Again depends on when the autoincremnt happens in the sequence...
>>> VAX architecture defines the behavior exactly.  The human brain?  Not
>>> so much.  :)
>>>
>>
>> As one would expect and pdp11 and 68k worked the same way, as
>> it's written in fact...
>
> Well... No. This was one of the major problems of the PDP-11, and one
> reason the VAX have all these specifications.

I was comparing Intel with pdp11 and others. With Intel, you need a
tst instruction following a cmp to set the flags, and only then can you
take a branch. I always. I always thought that fairly primitive when
compared with more elegant architectures such as pdp11, 68000 series and
even the 8 bit 6502. There, instructions such as mov, cmp etc, do set
flags, so a branch instruction can follow immediately, saving time and
memory.

As for differences, yes, there were, as there were differences between
the various vax models, where some instructions were emulated on the
uVax series.

>
> The PDP-11 handbooks instead have large tables with differences between
> different implementations. Lots of undefined behavior. Not nice

>
> Of course, it is not that you have someone write code that actually use
> these undefined sequences very often, but it do happen.
>
> This specific example don't exist on the PDP-11 however, as there is no
> MOVA instruction (but I sometimes wish I did have one...). But the one
> John had his problem example on, which was MOVL (R7)+,R7 is, I believe
> an example of where on the PDP-11 you might be in trouble.

Well, since R7 is the program counter on pdp and there's no movl,
just mov and movb, mileage may vary :-)...

>
> Johnny




More information about the Info-vax mailing list