aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Earnshaw <rearnsha@arm.com>2016-11-03 18:08:19 +0000
committerRichard Earnshaw <rearnsha@gcc.gnu.org>2016-11-03 18:08:19 +0000
commit1bac673faf4a0a0bd0a5606dad9d98b33d568510 (patch)
tree16d5962ff38b8730e9c99bfd7c2a76f15c6ec776 /gcc
parentac5b3efff29c2b0bf056adbb1e075927692653da (diff)
downloadgcc-1bac673faf4a0a0bd0a5606dad9d98b33d568510.zip
gcc-1bac673faf4a0a0bd0a5606dad9d98b33d568510.tar.gz
gcc-1bac673faf4a0a0bd0a5606dad9d98b33d568510.tar.bz2
[arm] Eliminate SUBTARGET_CPU_DEFAULT
* config.gcc (arm-wrs-vxworks): Set target_cpu_cname. (arm*-freebsd*): Likewise. (arm*-*-netbsdelf*): Likewise. (arm*-*-linux*): Likewise. (arm*-*-uclinux*eabi*): Likewise. (arm*-*-phoenix*): Likewise. (arm*-*-eabi*, arm*-*-symbianelf*, arm*-*-rtems*): Likewise. (arm*-*-*): Don't clobber target_cpu_cname when --with-cpu is not specified. Default to arm6 if target_cpu_cname is not set. * arm/arm.c (arm_option_override): Simplify logic. Assert that the default cpu has been correctly configured. * arm/arm.h (TARGET_CPU_DEFAULT): Delete. (target_cpus): Delete TARGET_CPU_generic, add TARGET_CPU_num_cores. * arm/freebsd.h (SUBTARGET_CPU_DEFAULT): Delete. * arm/linux-eabi.h (SUBTARGET_CPU_DEFAULT): Delete. * arm/linux-elf.h (SUBTARGET_CPU_DEFAULT): Delete. * arm/symbian.h (SUBTARGET_CPU_DEFAULT): Delete. * arm/unknown-elf.h (SUBTARGET_CPU_DEFAULT): Delete. From-SVN: r241827
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog21
-rw-r--r--gcc/config/arm/arm.c12
-rw-r--r--gcc/config/arm/arm.h9
-rw-r--r--gcc/config/arm/freebsd.h8
-rw-r--r--gcc/config/arm/linux-eabi.h6
-rw-r--r--gcc/config/arm/linux-elf.h2
-rw-r--r--gcc/config/arm/symbian.h6
-rw-r--r--gcc/config/arm/unknown-elf.h4
8 files changed, 24 insertions, 44 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index aa47e5d..3888d21 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,24 @@
+2016-11-03 Richard Earnshaw <rearnsha@arm.com>
+
+ * config.gcc (arm-wrs-vxworks): Set target_cpu_cname.
+ (arm*-freebsd*): Likewise.
+ (arm*-*-netbsdelf*): Likewise.
+ (arm*-*-linux*): Likewise.
+ (arm*-*-uclinux*eabi*): Likewise.
+ (arm*-*-phoenix*): Likewise.
+ (arm*-*-eabi*, arm*-*-symbianelf*, arm*-*-rtems*): Likewise.
+ (arm*-*-*): Don't clobber target_cpu_cname when --with-cpu is not
+ specified. Default to arm6 if target_cpu_cname is not set.
+ * arm/arm.c (arm_option_override): Simplify logic. Assert that the
+ default cpu has been correctly configured.
+ * arm/arm.h (TARGET_CPU_DEFAULT): Delete.
+ (target_cpus): Delete TARGET_CPU_generic, add TARGET_CPU_num_cores.
+ * arm/freebsd.h (SUBTARGET_CPU_DEFAULT): Delete.
+ * arm/linux-eabi.h (SUBTARGET_CPU_DEFAULT): Delete.
+ * arm/linux-elf.h (SUBTARGET_CPU_DEFAULT): Delete.
+ * arm/symbian.h (SUBTARGET_CPU_DEFAULT): Delete.
+ * arm/unknown-elf.h (SUBTARGET_CPU_DEFAULT): Delete.
+
2016-11-03 Jiong Wang <jiong.wang@arm.com>
* reg-notes.def (CFA_VAL_EXPRESSION): New entry.
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 5add0d6..6dc2d2d 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -3104,17 +3104,7 @@ arm_option_override (void)
arm_feature_set sought = ARM_FSET_EMPTY;;
arm_selected_cpu = &all_cores[TARGET_CPU_DEFAULT];
- if (!arm_selected_cpu->name)
- {
-#ifdef SUBTARGET_CPU_DEFAULT
- /* Use the subtarget default CPU if none was specified by
- configure. */
- arm_selected_cpu = &all_cores[SUBTARGET_CPU_DEFAULT];
-#endif
- /* Default to ARM6. */
- if (!arm_selected_cpu->name)
- arm_selected_cpu = &all_cores[arm6];
- }
+ gcc_assert (arm_selected_cpu->name);
sel = arm_selected_cpu;
insn_flags = sel->flags;
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index b2d8422..3d11555 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -55,7 +55,8 @@ enum target_cpus
TARGET_CPU_##INTERNAL_IDENT,
#include "arm-cores.def"
#undef ARM_CORE
- TARGET_CPU_generic
+ /* Total number of CPUs we handle. */
+ TARGET_CPU_num_cores
};
/* The processor for which instructions should be scheduled. */
@@ -83,12 +84,6 @@ extern GTY(()) rtx arm_target_insn;
/* Callback to output language specific object attributes. */
extern void (*arm_lang_output_object_attributes_hook)(void);
-/* Just in case configure has failed to define anything. */
-#ifndef TARGET_CPU_DEFAULT
-#define TARGET_CPU_DEFAULT TARGET_CPU_generic
-#endif
-
-
#undef CPP_SPEC
#define CPP_SPEC "%(subtarget_cpp_spec) \
%{mfloat-abi=soft:%{mfloat-abi=hard: \
diff --git a/gcc/config/arm/freebsd.h b/gcc/config/arm/freebsd.h
index 0ade4e9..949c397 100644
--- a/gcc/config/arm/freebsd.h
+++ b/gcc/config/arm/freebsd.h
@@ -112,14 +112,6 @@
#undef WCHAR_TYPE_SIZE
#define WCHAR_TYPE_SIZE BITS_PER_WORD
-#if defined (TARGET_FREEBSD_ARMv6)
-#undef SUBTARGET_CPU_DEFAULT
-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm1176jzs
-#else
-#undef SUBTARGET_CPU_DEFAULT
-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9
-#endif
-
/* FreeBSD 10 does not support unaligned access for armv6 and up.
Unaligned access support was added in FreeBSD 11. */
#if FBSD_MAJOR < 11
diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h
index ace8481..9cfcf9f 100644
--- a/gcc/config/arm/linux-eabi.h
+++ b/gcc/config/arm/linux-eabi.h
@@ -41,12 +41,6 @@
#undef ARM_DEFAULT_ABI
#define ARM_DEFAULT_ABI ARM_ABI_AAPCS_LINUX
-/* Default to armv5t so that thumb shared libraries work.
- The ARM10TDMI core is the default for armv5t, so set
- SUBTARGET_CPU_DEFAULT to achieve this. */
-#undef SUBTARGET_CPU_DEFAULT
-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
-
/* TARGET_BIG_ENDIAN_DEFAULT is set in
config.gcc for big endian configurations. */
#undef TARGET_LINKER_EMULATION
diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
index a94bd2d..cc17b51 100644
--- a/gcc/config/arm/linux-elf.h
+++ b/gcc/config/arm/linux-elf.h
@@ -45,8 +45,6 @@
#undef TARGET_DEFAULT
#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
-
#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
/* We do not have any MULTILIB_OPTIONS specified, so there are no
diff --git a/gcc/config/arm/symbian.h b/gcc/config/arm/symbian.h
index fc9c350..af078d5 100644
--- a/gcc/config/arm/symbian.h
+++ b/gcc/config/arm/symbian.h
@@ -59,12 +59,6 @@
/* Support the "dllimport" attribute. */
#define TARGET_DLLIMPORT_DECL_ATTRIBUTES 1
-/* Symbian OS assumes ARM V5 or above. Since -march=armv5 is
- equivalent to making the ARM 10TDMI core the default, we can set
- SUBTARGET_CPU_DEFAULT and get an equivalent effect. */
-#undef SUBTARGET_CPU_DEFAULT
-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
-
/* The assembler should assume VFP FPU format, and armv5t. */
#undef SUBTARGET_ASM_FLOAT_SPEC
#define SUBTARGET_ASM_FLOAT_SPEC \
diff --git a/gcc/config/arm/unknown-elf.h b/gcc/config/arm/unknown-elf.h
index fafe057..e5c0507 100644
--- a/gcc/config/arm/unknown-elf.h
+++ b/gcc/config/arm/unknown-elf.h
@@ -88,10 +88,6 @@
} \
while (0)
-#ifndef SUBTARGET_CPU_DEFAULT
-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm7tdmi
-#endif
-
/* The libgcc udivmod functions may throw exceptions. If newlib is
configured to support long longs in I/O, then printf will depend on
udivmoddi4, which will depend on the exception unwind routines,