i386: push <memory> ?

Stan Cox coxs@dg-rtp.dg.com
Tue Sep 9 13:32:00 GMT 1997


> 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)?

		cycles/	386	486	pentium	pentiumpro
mov mem to reg		4	1	1	1 uop
push reg		5	1	1	1 uop
push mem		5	4	2	2 uop

The 486 will stall in this case but you still come out ahead.  Pentium
and Pentiumpro won't stall.



More information about the Gcc mailing list