Fwd: if i have a 486 target, shouldnt i build an i486 target instead of a 686 target?
Nathan Kidd
nathan@hummingbird.com
Sat Jan 24 05:59:00 GMT 2004
John Utz wrote:
> 686 has instructions that dont exist on 486. i am wondering if i need
> to do something different with my toolset to make sure that my libraries
> dont contain any 686 code.
Gcc has the options:
-march=<CPU> (lowest-required-cpu) and
-mcpu=<CPU> (optimize for this cpu)
When dealing with CPU targetting you have opcodes, and then instruction
ordering. If you are targetting a 486, and only 486 then -march and
-mcpu should be i486. If you want to be able to run code on your 486,
but most people will have have 686, then you could use -march=i486
-mcpu=i686 so only opcodes up to 486 will be used, but the instruction
ordering will be designed for max permformance on a 686.
For further deatils see:
http://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/i386-and-x86-64-Options.html
Hope that helps,
-Nathan
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
More information about the crossgcc
mailing list