[Info-vax] 64-bit (was Re: New CEO of VMS Software)
Simon Clubley
clubley at remove_me.eisner.decus.org-Earth.UFP
Wed Jan 10 08:36:09 EST 2024
On 2024-01-09, Arne Vajhøj <arne at vajhoej.dk> wrote:
> On 1/9/2024 4:35 PM, John Dallman wrote:
>> In article <unkd47$25cg2$1 at dont-email.me>, arne at vajhoej.dk (Arne Vajhøj)
>> wrote:
>>> I suspect that all direct calls to LIB$ and SYS$ no matter if it is
>>> Macro-32 or Fortran or C would have to be manually edited to use
>>> new 64 bit capable version, but that the various language RTL
>>> could switch to 64 bit capable versions transparently.
>>
>> With a sufficiently regular naming scheme, a compiler could make
>> substitutions, but I don't know if the current scheme will cope.
>
> If the arguments are simple buffer addresses, then maybe the
> compiler could do something.
>
> But what with more complex data structures like item lists?
>
> A Fortran compiler could add a 64 to the function name called and
> could pass a 64 bit descriptor instead of a 32 bit descriptor for
> a string. But I can't imagine it changing all the addresses
> in an item list from INTEGER*4 to INTEGER*8.
>
It could if there was a SDL definition for the itemlist and if the SDL
definition contained information that the field was an address instead
of a longword.
As an alternative, and getting back to the core of the problem (Macro-32
does not have an address datatype so all addresses in HLLs were stored in
unabstracted longwords), if the user's source code defined that field as
an address pointer, instead of a uint32_t (for example), then the compiler
would have more information to work with when deciding whether to generate
32-bit or 64-bit addresses depending on the function name.
This is exactly what happened when badly-written C code was forced to
move from "unsigned long int ptr" to "struct some_struct_def *ptr" when
moving to the 64-bit world. The nice thing about that C code is that it
could be changed in a way that enabled it to continue working in both
a 32-bit and 64-bit environment.
Because of the mixed 32-bit/64-bit address space in VMS, this approach
would be more tricky than in Unix/Windows, but it could still be viable.
Simon.
--
Simon Clubley, clubley at remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.
More information about the Info-vax
mailing list