This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: AMD64 ABI compatibility
- From: Kai Tietz <Kai dot Tietz at onevision dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: Dave Korn <dave dot korn at artimi dot com>, gcc at gcc dot gnu dot org, Jan Hubicka <hubicka at ucw dot cz>, Jan Hubicka <jh at suse dot cz>, "'Nicolas Alt'" <nalt at apple dot com>
- Date: Tue, 10 Jul 2007 17:12:05 +0200
- Subject: Re: AMD64 ABI compatibility
> > >
> > > 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
fine.
>
> 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
REG_PARM_STACK_SPACE, OUTGOING_REG_PARM_STACK_SPACE, REGPARM_MAX,
SSE_REGPARM_MAX, STACK_BOUNDARY, etc.
Cheers,
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 - www.OneVision.com
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