This is the mail archive of the mailing list for the GCC project.

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: [TESTCASE] Minimized testcase for AltiVec segfault

>>>>> Aldy Hernandez writes:

Aldy> it's a bit tricky.  i don't see any way of altivec working without
Aldy> -mabi=altivec, but we couldn't just blindly modify the abi just because
Aldy> we had altivec enabled, so we had to add another flag.

Aldy> i think -maltivec without the abi changes is there for somebody who
Aldy> *really* knows what s/he's doing, has everything aligned properly, and
Aldy> wants to have a function callable from non altivec compiled functions.

	It is there for the same reason that -mpower and -mpower2 and
-mpowerpc and -mpowerpc-gpopt and -mpowerpc-gfxopt exist.  These are
individual features in the GCC port for this architecture.  For correct
operation they are suppose to be manipulated in concert.  The intent is
that the user implicitly access them with -mcpu=power, -mcpu=power2,
-mcpu=powerpc, -mcpu=604e, etc.  If you try to enable individual options
and don't know what you are doing, use at your own risk.

	For instance, if your default configuration is POWER architecture
and you invoke "gcc -mpowerpc" thinking it is like the old x86 -m486
option, you will get the *union* of the POWER and PowerPC instructions.
On a PowerPC system, all of the POWER instructions will trap and be
emulated by the OS, which probably is not what you wanted.  If you want
to compiler for a PowerPC chip, use -mcpu=powerpc.  Using the wrong
options, at best you will not get peak performance, at worst the program
will crash with an illegal instruction.


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