Re: x86-64 and calling conventions

Vidar Hokstad <vidar.hokstad@gmail.com>
Wed, 14 May 2008 08:20:27 -0700 (PDT)

          From comp.compilers

Related articles
[3 earlier articles]
Re: x86-64 and calling conventions vidar.hokstad@gmail.com (Vidar Hokstad) (2008-05-12)
Re: x86-64 and calling conventions daveparker@flamingthunder.com (Dave Parker) (2008-05-12)
Re: x86-64 and calling conventions cr88192@hotmail.com (cr88192) (2008-05-13)
Re: x86-64 and calling conventions cr88192@hotmail.com (cr88192) (2008-05-13)
Re: x86-64 and calling conventions gah@ugcs.caltech.edu (glen herrmannsfeldt) (2008-05-13)
Re: x86-64 and calling conventions james.harris.1@googlemail.com (James Harris) (2008-05-14)
Re: x86-64 and calling conventions vidar.hokstad@gmail.com (Vidar Hokstad) (2008-05-14)
Re: x86-64 and calling conventions james.harris.1@googlemail.com (James Harris) (2008-05-14)
Re: x86-64 and calling conventions cr88192@hotmail.com (cr88192) (2008-05-15)
Re: x86-64 and calling conventions cr88192@hotmail.com (cr88192) (2008-05-15)
Re: x86-64 and calling conventions bc@freeuk.com (Bart) (2008-05-14)
Re: x86-64 and calling conventions cr88192@hotmail.com (cr88192) (2008-05-15)
Re: x86-64 and calling conventions bolek-compilers@curl.com (Boleslaw Ciesielski) (2008-05-23)
[1 later articles]
| List of all articles for this month |
From: Vidar Hokstad <vidar.hokstad@gmail.com>
Newsgroups: comp.compilers
Date: Wed, 14 May 2008 08:20:27 -0700 (PDT)
Organization: Compilers Central
References: 08-05-031 08-05-043
Keywords: architecture, design
Posted-Date: 14 May 2008 12:05:33 EDT

On May 13, 4:10 am, Dave Parker <davepar...@flamingthunder.com> wrote:
> Left-to-right means the arguments are evaluated in
> the order that users expect them to be. If the function is vararg,
> then I push the argument count on the stack last.


The evaluation order and the calling convention don't need to be tied
together, though. Gcc on i386 for example subtracts the required
number of words from %esp and then copy the arguments into place via
indexed indirect mov's. No idea if that is slower or faster than
push'ing stuff onto the stack instead, but the version of gcc I've
used "gcc -S" on will use the mov approach even if all arguments are
constants.


Vidar



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.