aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAnatoly Sokolov <aesok@post.ru>2011-03-03 00:36:02 +0300
committerAnatoly Sokolov <aesok@gcc.gnu.org>2011-03-03 00:36:02 +0300
commit6b1ce5454015ba8f4d0c5d0e35130494d4a96128 (patch)
tree301129c5b208c3253f10c2e47790ff77b2a81497 /gcc
parentf8221c67ba78dff0d80fb5f9d9d3edfa5d842735 (diff)
downloadgcc-6b1ce5454015ba8f4d0c5d0e35130494d4a96128.zip
gcc-6b1ce5454015ba8f4d0c5d0e35130494d4a96128.tar.gz
gcc-6b1ce5454015ba8f4d0c5d0e35130494d4a96128.tar.bz2
stormy16.h (REGISTER_MOVE_COST, [...]): Remove.
* config/stormy16/stormy16.h (REGISTER_MOVE_COST, MEMORY_MOVE_COST): Remove. * config/stormy16/stormy16.c: Include reload.h. (xstormy16_memory_move_cost): New function. (TARGET_MEMORY_MOVE_COST): Define. From-SVN: r170623
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/stormy16/stormy16.c12
-rw-r--r--gcc/config/stormy16/stormy16.h4
3 files changed, 20 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3f58172..e4b040c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2011-03-02 Anatoly Sokolov <aesok@post.ru>
+
+ * config/stormy16/stormy16.h (REGISTER_MOVE_COST, MEMORY_MOVE_COST):
+ Remove.
+ * config/stormy16/stormy16.c: Include reload.h.
+ (xstormy16_memory_move_cost): New function.
+ (TARGET_MEMORY_MOVE_COST): Define.
+
2011-03-02 Richard Sandiford <richard.sandiford@linaro.org>
PR rtl-optimization/47925
diff --git a/gcc/config/stormy16/stormy16.c b/gcc/config/stormy16/stormy16.c
index 66cd145..eb456e2 100644
--- a/gcc/config/stormy16/stormy16.c
+++ b/gcc/config/stormy16/stormy16.c
@@ -46,6 +46,7 @@
#include "langhooks.h"
#include "gimple.h"
#include "df.h"
+#include "reload.h"
#include "ggc.h"
static rtx emit_addhi3_postreload (rtx, rtx, rtx);
@@ -108,6 +109,15 @@ xstormy16_address_cost (rtx x, bool speed ATTRIBUTE_UNUSED)
: 5);
}
+/* Worker function for TARGET_MEMORY_MOVE_COST. */
+
+static int
+xstormy16_memory_move_cost (enum machine_mode mode, reg_class_t rclass,
+ bool in)
+{
+ return (5 + memory_move_secondary_cost (mode, rclass, in));
+}
+
/* Branches are handled as follows:
1. HImode compare-and-branches. The machine supports these
@@ -2598,6 +2608,8 @@ static const struct default_options xstorym16_option_optimization_table[] =
#undef TARGET_ASM_CAN_OUTPUT_MI_THUNK
#define TARGET_ASM_CAN_OUTPUT_MI_THUNK default_can_output_mi_thunk_no_vcall
+#undef TARGET_MEMORY_MOVE_COST
+#define TARGET_MEMORY_MOVE_COST xstormy16_memory_move_cost
#undef TARGET_RTX_COSTS
#define TARGET_RTX_COSTS xstormy16_rtx_costs
#undef TARGET_ADDRESS_COST
diff --git a/gcc/config/stormy16/stormy16.h b/gcc/config/stormy16/stormy16.h
index daec8a2..ac42ebd 100644
--- a/gcc/config/stormy16/stormy16.h
+++ b/gcc/config/stormy16/stormy16.h
@@ -354,10 +354,6 @@ enum reg_class
/* Describing Relative Costs of Operations. */
-#define REGISTER_MOVE_COST(MODE, FROM, TO) 2
-
-#define MEMORY_MOVE_COST(M,C,I) (5 + memory_move_secondary_cost (M, C, I))
-
#define BRANCH_COST(speed_p, predictable_p) 5
#define SLOW_BYTE_ACCESS 0