Commit 8341f8c4 by Richard Earnshaw Committed by Richard Earnshaw

[arm] Introduce arm_active_target.

This patch creates a new data structure for carrying around the data
relating to the current compilation target.  The idea behind this is
that this data structure can be updated to reflect the overall
compilation target as new information is gathered (from command line
options) or architectural extensions.  We will no-longer have to grub
around looking in multiple places for this information.

There are some small behaviour changes around how we handle selecting
a default CPU if thumb or interworking are specified on the command
line and the default CPU does not support thumb, but I believe the
existing code was broken in that respect.  This code will go away once
we obsolete pre-armv4t devices.

	* arm-protos.h (arm_build_target): New structure.
	(arm_active_target): Declare it.
	* arm.c (arm_active_target): New variable.
	(bitmap_popcount): New function.
	(feature_count): Delete.
	(arm_initialize_isa): New function.
	isa_fpubits): New variable.
	(arm_configure_build_target): New function.
	(arm_option_override): Initialize isa_fpubits and arm_active_target.isa.
	Use arm_configure_build_target.

From-SVN: r243698
parent 00d1c28c
2016-12-15 Richard Earnshaw <rearnsha@arm.com> 2016-12-15 Richard Earnshaw <rearnsha@arm.com>
* arm-protos.h (arm_build_target): New structure.
(arm_active_target): Declare it.
* arm.c (arm_active_target): New variable.
(bitmap_popcount): New function.
(feature_count): Delete.
(arm_initialize_isa): New function.
isa_fpubits): New variable.
(arm_configure_build_target): New function.
(arm_option_override): Initialize isa_fpubits and arm_active_target.isa.
Use arm_configure_build_target.
2016-12-15 Richard Earnshaw <rearnsha@arm.com>
* arm-isa.h: New file. * arm-isa.h: New file.
* arm-protos.h: Include it. * arm-protos.h: Include it.
* arm-arches.def: Add new ISA field to all entries. Drop bogus * arm-arches.def: Add new ISA field to all entries. Drop bogus
...@@ -449,6 +449,31 @@ extern int arm_arch_no_volatile_ce; ...@@ -449,6 +449,31 @@ extern int arm_arch_no_volatile_ce;
than core registers. */ than core registers. */
extern int prefer_neon_for_64bits; extern int prefer_neon_for_64bits;
/* Structure defining the current overall architectural target and tuning. */
struct arm_build_target
{
/* Name of the target CPU, if known, or NULL if the target CPU was not
specified by the user (and inferred from the -march option). */
const char *core_name;
/* Name of the target ARCH. NULL if there is a selected CPU. */
const char *arch_name;
/* Preprocessor substring (never NULL). */
const char *arch_pp_name;
/* CPU identifier for the core we're compiling for (architecturally). */
enum processor_type arch_core;
/* The base architecture value. */
enum base_architecture base_arch;
/* Bitmap encapsulating the isa_bits for the target environment. */
sbitmap isa;
/* Flags used for tuning. Long term, these move into tune_params. */
unsigned int tune_flags;
/* Tables with more detailed tuning information. */
const struct tune_params *tune;
/* CPU identifier for the tuning target. */
enum processor_type tune_core;
};
extern struct arm_build_target arm_active_target;
#endif /* ! GCC_ARM_PROTOS_H */ #endif /* ! GCC_ARM_PROTOS_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment