i386: push <memory> ?
Joel N. Squire
squire@frodo.colorado.edu
Tue Sep 9 15:27:00 GMT 1997
meissner@cygnus.com writes:
>
> | Wouldn't it be better to use `pushl 4(%esp)' instead of loading it to %eax
> | and then pushing it (which probably causes pipeline stall as well)?
>
> No, the Intel docs say that for any x86 other than a 386, it is faster to do
> the load and then push (and in fact, gcc does this).
>
Note that the K6 optimization guide recommends using 'push mem'
instead of 'load reg; push reg' to reduce register pressure, since the
'push mem' will be translated to a 'load reg, store reg' sequence
internally anyway. Seems like the Pentium Pro would be similiar.
--
Joel Squire <squire@colorado.edu> CCAR Systems Administrator
Ph (303) 492-1308 FAX (303) 492-2825 University of Colorado, Boulder
More information about the Gcc
mailing list