* Re: [gentoo-user] Re: Cannot compile texinfo: Illegal instruction -> Wrong -march and -mtune flags?
@ 2007-08-02 22:07 99% ` Florian Philipp
0 siblings, 0 replies; 1+ results
From: Florian Philipp @ 2007-08-02 22:07 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 2239 bytes --]
Am Donnerstag 02 August 2007 23:36 schrieb Alexander Skwar:
> · Florian Philipp <f.philipp@addcom.de>:
> > 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
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [relevance 99%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2007-08-02 18:15 [gentoo-user] Cannot compile texinfo: Illegal instruction -> Wrong -march and -mtune flags? Alexander Skwar
2007-08-02 20:31 ` [gentoo-user] " Florian Philipp
2007-08-02 21:36 ` Alexander Skwar
2007-08-02 22:07 99% ` Florian Philipp
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox