This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [TESTCASE] Minimized testcase for AltiVec segfault
> Date: Thu, 28 Feb 2002 00:04:33 -0800
> From: Richard Henderson <rth@redhat.com>
> On Wed, Feb 27, 2002 at 06:20:53PM -0800, Geoff Keating wrote:
> > It doesn't produce "incorrect" code, so far as I know, it just doesn't
> > do what some people might think it would do, and often not what they
> > want to do either :-).
>
> Thus incorrect in quotes.
>
> > The problem is that the option name is too
> > short, really; it should be -menable-powerpc-instructions or something.
>
> My point exactly.
My plan for this is to split the PPC ISA/ABI options up into two
groups, the ones that change the ISA and the ones that change the
ABI; then combine them into just two options, one for each group.
For instance, to specify that you want to compile for a generic
powerpc processor with no FPU, you would write
-misa=generic-powerpc,soft-float
-mabi=svr4,soft-float
to specify that you wish to compile for 64-bit AIX, you would write
-mabi=aix64
to specify that you wish to compile for 64-bit AIX, on a POWER4
processor, using the "graphics extensions", you would write
-mabi=aix64
-misa=power4,gfxopt
To specify that you wish to build for linux, use altivec instructions
but not the altivec ABI, and tune for a ppc750, you would write
-misa=generic-powerpc,altivec
-mabi=svr4
-mtune=750
if you wanted to use the altivec ABI, you would write instead
-misa=generic-powerpc,altivec
-mabi=svr4,altivec
-mtune=750
If you wanted to use all the instructions available on a powerpc 7500,
which includes altivec and some other stuff, you would write instead
-misa=ppc7500
-mabi=svr4,altivec
The same thing without any altivec:
-misa=ppc7500,no-altivec
-mabi=svr4
The first element in the 'isa' and 'abi' options specifies a base
ISA/ABI, the remaining options specify add-ons.
If you specify an invalid combination, say you write
-misa=generic-powerpc,soft-float
but you don't specify a change of ABI, that's a hard error and
compilation stops with a helpful error message ("cannot implement SVR4
ABI without floating-point instructions, try -mabi=...,soft-float").
Anyway, this is what I hope to do when I get time. It would
completely replace the existing ISA and ABI selection options (maybe
with some compatibility left for the more commonly-used ones). It
should make it much much harder for users to get confused.
If I get some real time, the options may get called -fisa and -fabi
and this could be implemented for all ports. Would that be
interesting for everyone?
--
- Geoffrey Keating <geoffk@geoffk.org> <geoffk@redhat.com>