Why 64 bit?
Posted Sep 14, 2006 6:47 UTC (Thu) by
khim (subscriber, #9252)
In reply to:
Why 64 bit? by raven667
Parent article:
What you should (and shouldn't) expect from 64-bit Linux (Linux.com)
When everything else fails, RTFM.
And here we go:
-mtune=cpu-type: Tune to cpu-type everything applicable about the generated code, except for the ABI and the set of available instructions.
-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.
-mcpu=cpu-type: A deprecated synonym for -mtune.
Nothing like "separate code path", "fallback for i386" and other such nonsense. If you are specifying "-mcpu=i386 -mtune=i686" it just means: "try to optimize for i686, but don't use anything except i386 instructions". Quite sad, really: C++ code expirience can slowdown up to 30-40% with such options but usually just 5-10%.
Autoselection can be done (kernel does it in some configuration, OpenSSL does it, GLibC does it, some other programs are doing it - but that's up to application developer, compiler will not help you there... Where have you got ridiculous idea that it's task for the compiler - I do not know...
(
Log in to post comments)