Mail Archives: pgcc/2000/02/23/16:02:34
Got some odd results on the short integer addition code.
Using pgcc from 'Mandrake(70)', it seems to default to "-mpentium".
If I opt for 386, 486, or pentiumpro, it changes a
mov -14(%bp),%ax
into a:
movzwl -14(%bp),%eax
If I use the pgcc that comes with Suse(63), it defaults for 486, but
only in the case of "-mpentiumpro" does it do the above substitution.
So....I'm not familiar with the movzwl instruction. What does it
do and how does it's timing compare with the 'mov'. It looks like
a "move word and zero top 16 bits". My guess is that this is the
cause for the slowdown?
Oddly, under SuSE, the 486 has the same alignment (.16) as the pentium
option does on Mandrake. Switching the two on the respective OS's,
both result in a .4 alignmnent. Of course this makes no sense.
RH seems to default to the 386 option. Their 486 give a .16
alignment, but -mpentium gives a .4 alignment, and the pentiumpro
option gives .4 alignment but with the 'movzwl' instructions.
So exactly what *SHOULD* be the correct settings and should movzwl's
be faster than movw's on any arch?
Oh -- also, the 386 opt was the only one that used the "leave" instruction
to fixup the stack frame on exit. All others use the 2 mov instructions.
Did leave become slower on all subsequent x86's but it was faster on the
386?
Thanks...
-linda
--
Linda Walsh @ SGI | Core Linux - Trust Technology
1200 Crittenden Lane MS:30-3-802 | Voice: (650) 933-5338
Mountain View, CA 94043 | Email: law AT sgi DOT com
- Raw text -