[Info-vax] Native compilers
Johnny Billquist
bqt at softjar.se
Wed Mar 9 05:19:09 EST 2022
On 2022-03-08 23:29, chris wrote:
> 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.
Well, the point, and issue, where about when the autoincrements happen.
And the VAX architecture defines the behavior exactly. And the pdp11
does not work the same way. Because there, this, unfortunately, became
undefined. Which is what this string of comments was about. (See all the
quoting above.)
But I agree that the setting of condition codes by the instruction is a
nice thing.
> As for differences, yes, there were, as there were differences between
> the various vax models, where some instructions were emulated on the
> uVax series.
That becomes a question of speed, not behavior. On the PDP-11, an
instruction like:
MOV R0,(R0)+
might move different values to where R0 point, depending on model. Very
unfortunate...
>> 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 :-)...
Yes. You need to "translate" for PDP-11. But the concept/issue should be
clear.
Johnny
More information about the Info-vax
mailing list