Re: [PATCH] Support new egcs/pgcc -mpentium(pro) options

Mike A. Harris (mharris@ican.net)
Thu, 17 Dec 1998 10:47:41 -0500 (EST)


On Mon, 14 Dec 1998, Philipp Rumpf wrote:

>> this option dosen't make sense for pentium because there are no
>> architecture specific instrunctions available for it (but not for
>> pentiumpro). So the valide option for pentium is -mpentium.
>
>The only general-purpose instructions the Pentium introduced are
>compare and exchange instructions. AFAIK, those are not generated
>by any gcc-like compiler in the moment.
>
>So, there should be no difference between '-march=486 -mcpu=pentium'
>and '-march=pentium'.

I would think that instruction ordering would be VERY different
between the different x86 families, since Pentium instructions
are optimized differently in hardware than 486, and 386 chips.
All x86 family members differ significantly in this respect. Add
to that the pentium and later chips ability to execute 2 (or
possibly more on other chips and clones) simultaneously, and the
families thus optimize very differently. The pentium's U and V
pipes do not work the same, and as a result, code optimized for
486 won't utilize both pipes on the Pentium equally. The code
must be optimized for Pentium specifically. I'll put dollars to
donuts that PPro, PII, K5, K6, and K7 all differ significantly in
this respect, hence the different options.

I'm going by the info available in Michael Abrash's Zen of Code
Optimization book, and other Zen books, as well as various other
books I have around...

Just my $0.05

--
Mike A. Harris  -  Computer Consultant  -  Linux advocate

Linux software galore: http://freshmeat.net

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/