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: [arm] Rework arch defines


On Thu, 2004-04-29 at 14:05, Paul Brook wrote:
> The attached patch moves the handling of __ARM_ARCH_<x>__ from the SPEC 
> strings into TARGET_CPU_CPP_BUILTINS. This allows us to remove some more 
> hardcoded lists of CPU cores.
> 
> Tested with cross to arm-none-elf. Also checked that various -m{arch,cpu}= and 
> --with-{cpu,arch}= work as expected.
> Ok?
> 
> Paul
> 
> 2004-04-29  Paul Brook  <paul@codesourcery.com>
> 
> 	* configure.gcc: Default ep9312 to hard-float.
> 	* config/arm/arm-cores.def: Add ARCH field.
> 	* config/arm/arm.c (FL_FOR_ARCH*): Define.
> 	(arm_is_cirrus): New variable.
> 	(all_cores): Set and use arch.
> 	(all_architectures): Ditto.
> 	(arm_arch_name): New variable.
> 	(arm_override_options): Set it. Use [SUB]TARGET_CPU_DEFAULT.
> 	Set and use arm_is_cirrus.
> 	* config/arm/arm.h (TARGET_CPU_CPP_BUILTINS): Set arch defines.
> 	(enum processor_type): Update ARM_CORE define.
> 	(enum target_cpus): Add.  Replaces TARGET_CPU_* defines.
> 	(CPP_SPEC): Remove %(cpp_cpu_arch).
> 	(CPP_ARCH_DEFAULT_SPEC): Remove.
> 	(CPP_CPU_ARCH_SPEC): Remove.
> 	(EXTRA_SPECS): Don't use CPP_*ARCH*_SPEC.
> 	(FPUTYPE_DEFAULT): Don't define here.


> +   ARCH is the architecture revision impleemted by the chip.
 
Typo: "implemented".

+ARM_CORE(ep9312,       4,                               FL_LDSCHED
|             FL_CIRRUS, fastmul)

The ep9312 is based on an ARM9 core, so it's a 4T class device (I think
this was wrong in the old code).

+  {"ep9312",  ep9312,     "4",   FL_LDSCHED | FL_CIRRUS | FL_FOR_ARCH4,
NULL},

Same here.

+/* Nonzero if this chip is a Cirrus variant.  */
+int arm_is_cirrus = 0;

Please use either "arm_arch_cirrus" or "arm_tune_cirrus" depending on
what you want this variable to mean.  "arm_is_cirrus" is ambiguous when
the tuning and architecture differ.

I'm still a little uncomfortable that -mcpu=ep9312 can change the
default floating point format (an ABI issue), but it was like that
before this patch, so I'll let that one pass for the momemnt.

OK once the above issues are resolved.

R.


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