aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorSegher Boessenkool <segher@kernel.crashing.org>2017-10-10 01:05:37 +0200
committerSegher Boessenkool <segher@gcc.gnu.org>2017-10-10 01:05:37 +0200
commitd966425468fae968bcefb19ab764486e3e2e22e9 (patch)
tree4f431ff1f36ee408f7f57a0403edd50a3d5c6276 /gcc
parent2ab71f3d8707c9b292e5853050b5fbba2911fccb (diff)
downloadgcc-d966425468fae968bcefb19ab764486e3e2e22e9.zip
gcc-d966425468fae968bcefb19ab764486e3e2e22e9.tar.gz
gcc-d966425468fae968bcefb19ab764486e3e2e22e9.tar.bz2
rs6000: Move processor_costs to header
This moves the processor_costs structure declaration to the rs6000.h header file, so that things in other files can use it (not just things in rs6000.c). * config/rs6000/rs6000.c (processor_costs): Move to ... * config/rs6000/rs6000.h: ... here. (rs6000_cost): Declare. From-SVN: r253570
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/rs6000/rs6000.c23
-rw-r--r--gcc/config/rs6000/rs6000.h23
3 files changed, 30 insertions, 22 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5ba4c6c..202dd89 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2010-10-09 Segher Boessenkool <segher@kernel.crashing.org>
+
+ * config/rs6000/rs6000.c (processor_costs): Move to ...
+ * config/rs6000/rs6000.h: ... here.
+ (rs6000_cost): Declare.
+
2017-10-09 Eric Botcazou <ebotcazou@adacore.com>
* except.c (setjmp_fn): New global variable.
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 104f2ed..f98ef93 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -637,31 +637,10 @@ mode_supports_vsx_dform_quad (machine_mode mode)
}
-/* Target cpu costs. */
-
-struct processor_costs {
- const int mulsi; /* cost of SImode multiplication. */
- const int mulsi_const; /* cost of SImode multiplication by constant. */
- const int mulsi_const9; /* cost of SImode mult by short constant. */
- const int muldi; /* cost of DImode multiplication. */
- const int divsi; /* cost of SImode division. */
- const int divdi; /* cost of DImode division. */
- const int fp; /* cost of simple SFmode and DFmode insns. */
- const int dmul; /* cost of DFmode multiplication (and fmadd). */
- const int sdiv; /* cost of SFmode division (fdivs). */
- const int ddiv; /* cost of DFmode division (fdiv). */
- const int cache_line_size; /* cache line size in bytes. */
- const int l1_cache_size; /* size of l1 cache, in kilobytes. */
- const int l2_cache_size; /* size of l2 cache, in kilobytes. */
- const int simultaneous_prefetches; /* number of parallel prefetch
- operations. */
- const int sfdf_convert; /* cost of SF->DF conversion. */
-};
+/* Processor costs (relative to an add) */
const struct processor_costs *rs6000_cost;
-/* Processor costs (relative to an add) */
-
/* Instruction size costs on 32bit processors. */
static const
struct processor_costs size32_cost = {
diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
index 6021972..21e536b 100644
--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -2065,6 +2065,29 @@ extern scalar_int_mode rs6000_pmode;
#define REVERSE_CONDITION(CODE, MODE) rs6000_reverse_condition (MODE, CODE)
+/* Target cpu costs. */
+
+struct processor_costs {
+ const int mulsi; /* cost of SImode multiplication. */
+ const int mulsi_const; /* cost of SImode multiplication by constant. */
+ const int mulsi_const9; /* cost of SImode mult by short constant. */
+ const int muldi; /* cost of DImode multiplication. */
+ const int divsi; /* cost of SImode division. */
+ const int divdi; /* cost of DImode division. */
+ const int fp; /* cost of simple SFmode and DFmode insns. */
+ const int dmul; /* cost of DFmode multiplication (and fmadd). */
+ const int sdiv; /* cost of SFmode division (fdivs). */
+ const int ddiv; /* cost of DFmode division (fdiv). */
+ const int cache_line_size; /* cache line size in bytes. */
+ const int l1_cache_size; /* size of l1 cache, in kilobytes. */
+ const int l2_cache_size; /* size of l2 cache, in kilobytes. */
+ const int simultaneous_prefetches; /* number of parallel prefetch
+ operations. */
+ const int sfdf_convert; /* cost of SF->DF conversion. */
+};
+
+extern const struct processor_costs *rs6000_cost;
+
/* Control the assembler format that we output. */
/* A C string constant describing how to begin a comment in the target