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


Geoff Keating wrote:
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'.

Can you point me at a description the PPC-SPE 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.

This patch makes gcc not generate FP instr with -mcpu=8540.



2004-05-17 Michael Eager <eager@mvista.com>


	* config/rs6000/rs6000.c (rs6000_override_options):
	PPC8540 does not have FP regs.

Index: gcc/config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.643
diff -u -r1.643 rs6000.c
--- gcc/config/rs6000/rs6000.c 15 May 2004 12:39:34 -0000 1.643
+++ gcc/config/rs6000/rs6000.c 17 May 2004 21:21:59 -0000
@@ -757,7 +757,8 @@
{"801", PROCESSOR_MPCCORE, POWERPC_BASE_MASK | MASK_SOFT_FLOAT},
{"821", PROCESSOR_MPCCORE, POWERPC_BASE_MASK | MASK_SOFT_FLOAT},
{"823", PROCESSOR_MPCCORE, POWERPC_BASE_MASK | MASK_SOFT_FLOAT},
- {"8540", PROCESSOR_PPC8540, POWERPC_BASE_MASK | MASK_PPC_GFXOPT},
+ {"8540", PROCESSOR_PPC8540, POWERPC_BASE_MASK | MASK_SOFT_FLOAT |
+ MASK_PPC_GFXOPT},
{"860", PROCESSOR_MPCCORE, POWERPC_BASE_MASK | MASK_SOFT_FLOAT},
{"970", PROCESSOR_POWER4,
POWERPC_7400_MASK | MASK_PPC_GPOPT | MASK_MFCRF | MASK_POWERPC64},


	
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.

Maybe later.



-- Michael Eager eager@mvista.com 408-328-8426 MontaVista Software, Inc. 1237 E. Arques Ave., Sunnyvale, CA 94085


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