This is the mail archive of the gcc-patches@gcc.gnu.org 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: Patch config.gcc to accept --with-cpu=85xx for PowerPC


> X-Original-To: geoffk@foam.wonderslug.com
> Date: Fri, 14 May 2004 10:27:27 -0700
> From: Michael Eager <eager@mvista.com>
> Organization: MontaVista Software
> X-Accept-Language: en-us, en
> Cc: gcc-patches@gcc.gnu.org
> X-OriginalArrivalTime: 14 May 2004 17:14:35.0140 (UTC) FILETIME=[EDF72C40:01C439D6]
> 
> Geoff Keating wrote:
> > Michael Eager <eager@mvista.com> writes:
> > 
> > 
> >>The attached patch makes gcc configure correctly with
> >>--target=powerpc-unknown-linux and --with-cpu=8540.  This is the
> >>same as --target=powerpc-unknown-linux-spe.
> > 
> > 
> > It's the same as using --target=powerpc-linux and then using
> > -mcpu=8540, which does not trigger the SPE ABI, and is therefore not
> > the same as powerpc-unknown-linux-spe.  The patch is not OK.
> 
> In the patch, linuxspe.h is appended to the tm header list when
> configured with --with-cpu=8540.  So it should configure exactly the
> same as powerpc-unknown-linux-spe.

Yes.  That's why the patch was rejected.

> >>PowerPC seems to append model specific features to the target
> >>tuple (eg, altivec, spe).  IMO, these features should be handled
> >>dynamically (as they often are) or at worst, by testing --with-cpu in
> >>configure.
> > 
> > 
> > These aren't "model specific features", they are ABI specifications.
> 
> I guess that's a matter of viewpoint.  Not having FP regs seems to me
> to be a processor characteristic, not an ABI characteristic.

No, it's really not a matter of viewpoint.  I did not mean 'they look
like ABI specifications', I meant 'they specify the ABI'.

> Specifying --target=powerpc-linux and -mcpu=8540 generates code which
> is incorrect for the 8540, because it uses FP instructions.

According to the table in rs6000_override_options, the 8540 *does*
have FP instructions.  If it doesn't, that's a bug.  Patches to fix
that are welcome.

> As for ABI differences, other arch's handle this with -mabi, not
> different configuration.  (I'm not always happy with the muddle
> of MIPS mcpu/mtune/march/mabi, but at least I don't have to configure
> gcc differently for each version.)

rs6000 handles this with -mabi, too, but that wasn't implemented for
the SPE work.  Patches to fix that are welcome, too.

-- 
- Geoffrey Keating <geoffk@geoffk.org>


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