AMD64 ABI compatibility

Kai Tietz
Tue Jul 10 15:12:00 GMT 2007

> > > 
> > > For MS I would probably suggest ms_abi (it makes it cleaner that the
> > > attribute is affecting calling convetion). For our abi I am not 
sure, we
> > > can sysv_abi or something else...
> > 
> > I will prepare an patch for it. For me "ms_abi" and "sysv_abi" is 
> I would say that it is in general very desirable feature for wine
> programmers and similar projects (I would preffer to have
> confirmation that they are going to need it however ;).
> The implementation will be moderately tricky - you will need to keep
> track of functions calling foreign functions and adjust behaviour of 
> ix86_function_arg_regno_p and friends accordingly.
> Also the set of call clobbered registers differs. Since MS ABI has fewer
> of them, calling from SYSV ABI is OK, but in the other direction I guess
> the call pattern will need to have variants with clobbers of SI/DI.
> But if you are interested to implement it, you are definitly welcome ;)
> Honza

I am on that tricky thing ;) I think I need in i386.c an global variable 
"ix86_amd64_abi" which helds the the current function abi. This means also 
that I have to use instead of TARGET_64BIT_MS_ABI this variable. This var 
may initioalized by init_cumulative_args and the overriden 

 i.A. Kai Tietz

|  (\_/)  This is Bunny. Copy and paste Bunny
| (='.'=) into your signature to help him gain
| (")_(") world domination.

  OneVision Software Entwicklungs GmbH & Co. KG
  Dr.-Leo-Ritter-Straße 9 - 93049 Regensburg
  Tel: +49.(0)941.78004.0 - Fax: +49.(0)941.78004.489 -
  Commerzbank Regensburg - BLZ 750 400 62 - Konto 6011050
  Handelsregister: HRA 6744, Amtsgericht Regensburg
  Komplementärin: OneVision Software Entwicklungs Verwaltungs GmbH
  Dr.-Leo-Ritter-Straße 9 – 93049 Regensburg
  Handelsregister: HRB 8932, Amtsgericht Regensburg - Geschäftsführer: 
Ulrike Döhler, Manuela Kluger

More information about the Gcc mailing list