[FreeVMS] gcc and VMS calling standard

bojan at alba.si bojan at alba.si
Mar 29 Avr 18:42:58 CEST 2008


Hi,

I give a very quick look to the bliss frontend and if I understand your 
code you add an extra argument at the beginning. This puts this argument 
to the top of the argument stack on i386.

My patch is made on the i386 backend. The mechanism is the same. When 
you add the __vmscall__ attribute to the function the number of 
longwords is pushed on the stack. I did nothing for the 64 bit variant 
because the calling standard is similar to the alpha one. Arguments are 
send in registers and a special register (AL) is set to know how many 
registers were used and I have to study the whole calling system.
To get the number of I create a builtin function __builtin_va_count () 
which returns the number of arguments (@AP speaking in VAX MACRO)

The backend defines also two new macros for gcc "__vms" and "__VMS".
I am not sure if this is OK. Maybe a "__freevms" macro will be better or 
maybe both. This macros can bring some problems if you install the 
compiler as the default compiler on your linux system.

I need some opinions about this.

Bojan



Plus d'informations sur la liste de diffusion FreeVMS