Skip to content

Commit

Permalink
[arm] Eliminate SUBTARGET_CPU_DEFAULT
Browse files Browse the repository at this point in the history
	* 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.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@241827 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
rearnsha committed Nov 3, 2016
1 parent 2276e7e commit ff3caa3
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 44 deletions.
21 changes: 21 additions & 0 deletions gcc/ChangeLog
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
12 changes: 1 addition & 11 deletions gcc/config/arm/arm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
9 changes: 2 additions & 7 deletions gcc/config/arm/arm.h
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down Expand Up @@ -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: \
Expand Down
8 changes: 0 additions & 8 deletions gcc/config/arm/freebsd.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions gcc/config/arm/linux-eabi.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions gcc/config/arm/linux-elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions gcc/config/arm/symbian.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
4 changes: 0 additions & 4 deletions gcc/config/arm/unknown-elf.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ff3caa3

Please sign in to comment.