RE: pushl vs movl + movl on x86

2005-08-23 Thread Menezes, Evandro
Dan, > Is there a performance difference between the movl + movl and > pushl code sequences? Not in this example, but movl is faster in some circumstances than pushl. A sequence of pushl has an implicit dependency chain on %esp, as it changes after each pushl, whereas a sequence of movl cou

Re: pushl vs movl + movl on x86

2005-08-23 Thread Richard Henderson
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 o