[FreeVMS] gcc and VMS calling standard

Roar Thronæs roart at nvg.ntnu.no
Mar 29 Avr 09:11:29 CEST 2008


On Sun, Apr 27, 2008 at 11:24:30AM +0200, bojan at alba.si wrote:
> 
> Looking to the gcc backend I figured out how to modify it and implement something similar to the VMS calling standard on VAX.
> With my modification you can add an attribute to the function, which instructs the compiler to push the number of arguments (longwords) to the stack when calling the function.
> I have also added an built in function which can be used to implement the va_count macro. The gcc version I used was 4.1.2 and only for i386 (some more study must be done for 64bit targets).

Fine work.
Thanks.

> So my questions are:
> 
> - Have you implemented (and how if yes) the variable argument count?

Just something equivalent and workarounds.
See the Bliss frontend and option minimum-actuals (workaround).
It has been too long time since I did something with the Bliss frontend,
but linkage call and builtin ap may trigger something equivalent.
In parse.y, search for "ap", "call", "nullparameter", is_counted, FLAG_5.
With C I also did a workaround with zarg.h.
But it would be very nice doing it properly.

> - Which version of gcc is used to compile FreeVMS?

Mainly etch default gcc, 4.1.1/2.
(Sarge and gcc 3.3.5 may also be used, but sarge is old and etch current,
and sarge support may be dropped soon.)
For 32-bit telnet client Bliss frontend for pure gcc 4.2.1.

> - How can I share my code?

You may email it to me, so I can put it out on the ftp site at first
and then figure out how to include it in the build process.

-- 
Regards,
Roar Thronæs


Plus d'informations sur la liste de diffusion FreeVMS