Am Freitag 03 August 2007 03:06 schrieb Daniel da Veiga: > On 8/2/07, Florian Philipp <[EMAIL PROTECTED]> wrote: > > Am Donnerstag 02 August 2007 23:36 schrieb Alexander Skwar: > > > ยท Florian Philipp <[EMAIL PROTECTED]>: > > > > You see, they are not compatible and even if some code works I > > > > wouldn't bet multimedia apps will perform well. > > > > > > > > With -mtune the instruction set stays the same. It is just > > > > "rearranged". > > > > > > Hm. Allright. When using just -mtune (ie. without -march), the > > > docs at > > > http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/i386-and-x86_002d64-Options > > >.htm l > > > > > > say: > > > | While picking a specific cpu-type will schedule things appropriately > > > | for that particular chip, the compiler will not generate any code > > > | that does not run on the i386 without the -march=cpu-type option > > > | being used. > > > > > > If -mtune=athlon-xp is used, code is generated which may make > > > use of 3dNOW!. 3dNOW! is, of course, not to be found on 386 :) > > > If the instruction set stays the same, code generated with > > > -mtune=athlon-xp would not be executable on 386 machines, if > > > I understand you correctly. > > > > > > Hm. With -mtune, the set of available instructions (ie. > > > stuff like 3dNOW!, I suppose?) is NOT changed from the default > > > of i386, is it? Or what does "Tune to cpu-type everything applicable > > > about the generated code, except for the ABI and the set of available > > > instructions." mean - especially note the "except for [...] the set of > > > available instructions" part. > > > > > > So with "-mtune=pentium-m -march=athlon-xp" I'm making the compiler > > > generate code which is "ordered" the way it's best for pentium-m > > > machines while allowing it to use athlon-xp instruction set? Is > > > that what I'm doing? > > > > > > If so, then it seems you're right - code will run, but maybe not > > > so well. > > > > > > Is that understanding correct? If so, then I really should think > > > twice about using "-mtune=pentium-m -march=athlon-xp", shouldn't > > > I? > > > > > > Curious, > > > > > > Alexander Skwar > > > -- > > > > At least that's how I understand the issue. At the moment I've got two > > ideas to solve your problem: > > > > 1. set march to an inferior target (pentium-3 and pentium-3m seem okay: > > mmx and sse) and mtune for one (or even both?) of them > > 2. set march to one of them and disable incompatible instruction sets > > with options like -mno-sse2 or -mno-3dnow > > Isn't the -march=i686 valid? > I guess that would be the most "compatible" option for binaries that > will run on AMD and Intel processors... Or simply use no "-march" > setting, only "-mtune"... I did that recently to switch a whole system > from an Athlon XP to a Intel Core Duo... > -march=i686 -mmmx -msse would be the better choice, then.
I'd still like to know what gcc does when you enable two mtune settings. Use the last one? Use both?
pgpvQHpUTwOYK.pgp
Description: PGP signature

