This is the mail archive of the gcc@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: pushl vs movl + movl on x86


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~


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