This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: pushl vs movl + movl on x86
- From: Richard Henderson <rth at redhat dot com>
- To: Dan Nicolaescu <dann at mothra dot ics dot uci dot edu>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 23 Aug 2005 13:08:42 -0700
- Subject: Re: pushl vs movl + movl on x86
- References: <200508231840.j7NIeIKE014183@scanner2.ics.uci.edu>
On Tue, Aug 23, 2005 at 11:40:16AM -0700, Dan Nicolaescu wrote:
> Is there a performance difference between the movl + movl and pushl
> code sequences?
In this case, no.
> If not maybe then gcc should generate pushl for -O2
> too because it is smaller code.
It's not quite as simple as you make out. You can get pushes out
of gcc with -mno-accumulate-outgoing-args, but then we have to add
other compensation code elsewhere.
IIRC, it was fairly well explored that we get equal or better
performance by not using pushes on P2 class machines and later.
r~