This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Default function calling convention on x86_64
- From: Thiago Guzella <thiago dot guzella at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Fri, 22 Oct 2004 15:52:06 -0300
- Subject: Default function calling convention on x86_64
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=kBC0ymn67pc63nC05Dp1HMwsfpreC7gRGZW+HEJnIzchAjfWdA+KC3EqAz91nko3MntrjFhRm/67rGPBDYVN1IMqbL+H0mmRA4XfqFQCvGS4LhLVV2hcJIxEQOCKeL/aazCarL5Q30fmrR1GKcOZbR08pJr6vMLz7D+Yi1pLdY4=
- Reply-to: Thiago Guzella <thiago dot guzella at gmail dot com>
Hi there,
I am not sure if I'm supposed to post this in here, so forgive me in
case I'm wrong...
I am engaged in the development of a linux benchmark system (something
like Sandra under Window$). For such project I will be needing to
write some assembly code, specially for AMD64 systems...
Well, my question is:
Why does gcc ignores user defined calling conventions when generating
64 bit code????
When compiling a function like
void some_func() __attribute__ ((cdecl));
I get the warning: warning: `cdecl' attribute ignored
If the same code is compiled using -m32, I see no warnings...
By looking at the assembly generated code, I think (I'm still a little
confused by AMD64's gas syntax) the arguments are passed on registers.
Can someone confirm this??
The fact is that I need to set the calling convention as cdecl for all
assembly linked functions so that 64 and 32 bit asm functions do not
differ when it comes to argument handling... I know the best thing
would be to use gcc's inline assembly syntax, but I'm really too lazy
to learn it :) ...
Thanks
Thiago Guzella