This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new Linux.com!

Linux.com

Invalid test, and here's why

Posted by: Anonymous Coward on July 06, 2005 09:13 PM
From the pages of the GCC manual at <a href="http://gcc.gnu.org/" title="gnu.org">http://gcc.gnu.org/</a gnu.org>

-mtune=cpu-type
k8, opteron, athlon64, athlon-fx
AMD K8 core based CPUs with x86-64 instruction set support. (This supersets MMX, SSE, SSE2, 3dNOW!, enhanced 3dNOW! and 64-bit instruction set extensions.)

-march=cpu-type
Generate instructions for the machine type cpu-type. The choices for cpu-type are the same as for -mtune. Moreover, specifying -march=cpu-type implies -mtune=cpu-type.

So you should be using "-march=k8" here.

Also if you check AMD's documentation at <a href="http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/32035.pdf" title="amd.com">http://www.amd.com/us-en/assets/content_type/whit<nobr>e<wbr></nobr> _papers_and_tech_docs/32035.pdf</a amd.com> you will also see the following recommended optimisations when compiling

"-O3 -ffast-math -funroll-all-loops -fpeel-loops -ftracer -funswitch-loops -funit-at-a-time"

#

Return to 64-bit performance in Gentoo Linux