[Info-vax] VAX vs. MV/8000 [was Re: Hard links on VMS ODS5 disks]
Johnny Billquist
bqt at softjar.se
Mon Aug 28 08:32:01 EDT 2023
On 2023-08-28 13:15, John Dallman wrote:
> In article <ucgkbf$1bupe$2 at dont-email.me>, arne at vajhoej.dk (Arne Vajhøj)
> wrote:
>
>> On 8/27/2023 8:45 AM, Dan Cross wrote:
>>> Ah, this is precisely what x86 does, again underscoring how it
>>> is different from the approach that DEC chose with PDP-11
>>> compatibility on the VAX.
>>
>> That is not how x86-64 work.
>>
>> You cannot mix code.
>>
>> A 64 bit program cannot use 32 bit libraries.
>>
>> The build will detect it and reject it. But if that check was
>> disabled then the result would be almost guaranteed to crash.
>
> Dan is distinguishing between what the x86-64 hardware can do, and what
> the commonly-used operating systems support.
>
> None of Linux, macOS and Windows support calling libraries built for the
> x86-32 versions of the respective operating systems from programs built
> for the x86-64 versions of the operating systems. You're quite right
> about that.
[...]
I've tried to stay out, and don't want to get too deep in.
But in a sense, my question/issue would be: Can you take a binary for
x86 and run it without any "mode bit", or anything else, on an x86-64
and it works?
Individual instructions is not all. Will the stack offsets remain the
same when I push stuff, will address references be fine when I just use
32 bits, and do arithmetic and address offsets and so on.
If that is the case, then yes, it has been done the same way DG did it.
Which truly meant you could take your old binaries and run them on the
newer hardware without any added trickery.
If "it works, but some things will break", then it don't work. If you
need to turn on some mode bit in order for it to work, then it is not
like DG did it. (See previous comments about mode bits...)
If the fact is just that a program written for x86-64 can also use
instructions from the x86 intermixed with new stuff, then sure. It
allows code written for the x86-64 to use a (possibly) larger
instruction set. But that code/program will not run on an x86.
So, while not entirely as much of a different mode than the VAX PDP-11
mode, it's really still more on that side than the DG side, I would say.
Oh, and with that said. The DG way was *horrible*. You had two different
stacks, a total of 7 registers to deal with the two stacks (don't even
ask), if I remember right even duplicates of similar instructions for if
you wanted to make use of the larger address space and registers.
It was *not* something I would want to throw on anyone. The VAX way was
much better, and that compatibility mode could be dropped, or shifter
over to software when it became less important, and leave the actual VAX
clean and nice (relatively speaking).
(And the PDP-11 mode on the VAX meant that you could take most user
space PDP-11 binaries over to the VAX and run them, which was the same
goal both DEC and DG had. Just the two different approaches to
accomplish it.)
Johnny
More information about the Info-vax
mailing list