This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fwd: if i have a 486 target, shouldnt i build an i486 targetinstead of a 686 target?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]