This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [PATCH] Fastcall support on cygwin and mingw targets



> -----Original Message-----
> From: Fergus Henderson [mailto:fjh@ceres.cs.mu.OZ.AU] On 
> Behalf Of Fergus Henderson
> Sent: 11. november 2002 02:51
> To: Casper Hornstrup
> Cc: gcc-patches@gcc.gnu.org
> Subject: Re: [PATCH] Fastcall support on cygwin and mingw targets
> 
> 
> Some comments above the definition of ASM_OUTPUT_LABELREF 
> would be nice.
> 

OK.

> What happens if a function has multiple attributes,
> e.g. both fastcall and stdcall or both fastcall and 
> regparm(3)? It may be worth adding a test for that case.
> 

stdcall attribute after fastcall attribute - fastcall calling
convention is used, but the symbol is prefixed with _ not @.

Obviously a bug, but how should this situation be handled?
Which attribute should win and should gcc emit a warning or
error out?

fastcall attribute after stdcall attribute - same result.
fastcall attribute after regparm(3) attribute - fastcall wins.
regparm(3) attribute after fastcall attribute - fastcall wins.

> >+ The @code{fastcall} calling convention exists in Windows 
> NT for Intel 
> >+ processors only.
> 
> That part of the documentation is wrong.
> Cygwin and Mingw work on most variants of Windows, not just 
> Windows NT.

I think it is a reference to fastcall only being used on Intel
Windows NT platforms (eg. it was not used on Windows NT/Alpha).
Maybe it should be removed?

Casper


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]