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] 3rd try: Add sseregparm function attribute for x86


Richard Henderson wrote:
> On Thu, Jun 09, 2005 at 11:22:44PM +0200, Richard Guenther wrote:
> 
>>!               error ("fastcall and stdcall attributes are not compatible");
> 
> 
> I don't think you should remove this.  This behaviour comes from 
> Windows compilers.

Can you be more specific here?  Those attributes look compatible from
both looking at the documentation and from runtime-testing (on linux):

@item stdcall
@cindex functions that pop the argument stack on the 386
On the Intel 386, the @code{stdcall} attribute causes the compiler to
assume that the called function will pop off the stack space used to
pass arguments, unless it takes a variable number of arguments.

@item fastcall
@cindex functions that pop the argument stack on the 386
On the Intel 386, the @code{fastcall} attribute causes the compiler to
pass the first argument (if of integral type) in the register ECX and
the second argument (if of integral type) in the register EDX@.  Subsequent
and other typed arguments are passed on the stack.  The called function will
pop the arguments off the stack.  If the number of arguments is variable all
arguments are pushed on the stack.

In fact, specifying stdcall in addition to fastcall is only redundant.

Richard.


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