· 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.html
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
-- 
No matter how many resources you have, it is never enough. 
        -- Murphy's Computer Laws n�1


-- 
[EMAIL PROTECTED] mailing list

Reply via email to