aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAnatoly Sokolov <aesok@post.ru>2011-08-09 19:09:41 +0400
committerAnatoly Sokolov <aesok@gcc.gnu.org>2011-08-09 19:09:41 +0400
commit6e9ee54ca64d761e0cbfb7981dafbfcb9704240c (patch)
treee3d25a25759a060ac01da2548173d0c08a9b038f /gcc
parent394b15208dc632c744257ca1ea628568d6811d42 (diff)
downloadgcc-6e9ee54ca64d761e0cbfb7981dafbfcb9704240c.zip
gcc-6e9ee54ca64d761e0cbfb7981dafbfcb9704240c.tar.gz
gcc-6e9ee54ca64d761e0cbfb7981dafbfcb9704240c.tar.bz2
mmix.h (REGISTER_MOVE_COST): Remove macro.
* config/mmix/mmix.h (REGISTER_MOVE_COST): Remove macro. * config/mmix/mmix-protos.h (mmix_register_move_cost): Remove. * config/mmix/mmix.c (mmix_register_move_cost): Make static. Change 'from' and 'to' arguments type to reg_class_t. (TARGET_REGISTER_MOVE_COST): Define. From-SVN: r177600
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/mmix/mmix-protos.h2
-rw-r--r--gcc/config/mmix/mmix.c16
-rw-r--r--gcc/config/mmix/mmix.h17
4 files changed, 20 insertions, 23 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 24883ea..a47ca45 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2011-08-09 Anatoly Sokolov <aesok@post.ru>
+
+ * config/mmix/mmix.h (REGISTER_MOVE_COST): Remove macro.
+ * config/mmix/mmix-protos.h (mmix_register_move_cost): Remove.
+ * config/mmix/mmix.c (mmix_register_move_cost): Make static.
+ Change 'from' and 'to' arguments type to reg_class_t.
+ (TARGET_REGISTER_MOVE_COST): Define.
+
2011-08-09 Vladimir Makarov <vmakarov@redhat.com>
PR target/50026
diff --git a/gcc/config/mmix/mmix-protos.h b/gcc/config/mmix/mmix-protos.h
index a6faf6e..4e8c338 100644
--- a/gcc/config/mmix/mmix-protos.h
+++ b/gcc/config/mmix/mmix-protos.h
@@ -26,8 +26,6 @@ extern int mmix_starting_frame_offset (void);
extern int mmix_function_arg_regno_p (int, int);
extern void mmix_function_profiler (FILE *, int);
extern int mmix_reversible_cc_mode (enum machine_mode);
-extern int mmix_register_move_cost
- (enum machine_mode, enum reg_class, enum reg_class);
extern const char *mmix_text_section_asm_op (void);
extern const char *mmix_data_section_asm_op (void);
extern void mmix_output_quoted_string (FILE *, const char *, int);
diff --git a/gcc/config/mmix/mmix.c b/gcc/config/mmix/mmix.c
index e6cebce..f249a66 100644
--- a/gcc/config/mmix/mmix.c
+++ b/gcc/config/mmix/mmix.c
@@ -141,6 +141,8 @@ static void mmix_setup_incoming_varargs
static void mmix_file_start (void);
static void mmix_file_end (void);
static bool mmix_rtx_costs (rtx, int, int, int *, bool);
+static int mmix_register_move_cost (enum machine_mode,
+ reg_class_t, reg_class_t);
static rtx mmix_struct_value_rtx (tree, int);
static enum machine_mode mmix_promote_function_mode (const_tree,
enum machine_mode,
@@ -224,6 +226,9 @@ static void mmix_conditional_register_usage (void);
#undef TARGET_ADDRESS_COST
#define TARGET_ADDRESS_COST hook_int_rtx_bool_0
+#undef TARGET_REGISTER_MOVE_COST
+#define TARGET_REGISTER_MOVE_COST mmix_register_move_cost
+
#undef TARGET_MACHINE_DEPENDENT_REORG
#define TARGET_MACHINE_DEPENDENT_REORG mmix_reorg
@@ -1233,12 +1238,15 @@ mmix_rtx_costs (rtx x ATTRIBUTE_UNUSED,
return false;
}
-/* REGISTER_MOVE_COST. */
+/* TARGET_REGISTER_MOVE_COST.
-int
+ The special registers can only move to and from general regs, and we
+ need to check that their constraints match, so say 3 for them. */
+
+static int
mmix_register_move_cost (enum machine_mode mode ATTRIBUTE_UNUSED,
- enum reg_class from,
- enum reg_class to)
+ reg_class_t from,
+ reg_class_t to)
{
return (from == GENERAL_REGS && from == to) ? 2 : 3;
}
diff --git a/gcc/config/mmix/mmix.h b/gcc/config/mmix/mmix.h
index 31d21b9..787f64f 100644
--- a/gcc/config/mmix/mmix.h
+++ b/gcc/config/mmix/mmix.h
@@ -617,23 +617,6 @@ typedef struct { int regs; int lib; } CUMULATIVE_ARGS;
/* Node: Costs */
-/* The special registers can only move to and from general regs, and we
- need to check that their constraints match, so say 3 for them. */
-/* WARNING: gcc-2.7.2.2 i686-pc-linux-gnulibc1 (as shipped with RH 4.2)
- miscompiles reload1.c:reload_cse_simplify_set; a call to
- reload_cse_regno_equal_p is missing when checking if a substitution of
- a register setting is valid if this is defined to just the expression
- in mmix_register_move_cost.
-
- Symptom: a (all?) register setting is optimized away for e.g.
- "char *p1(char *p) { return p+1; }" and the value of register zero ($0)
- is returned.
-
- We can workaround by making this a function call - unknown if this
- causes dire speed effects. */
-#define REGISTER_MOVE_COST(MODE, FROM, TO) \
- mmix_register_move_cost (MODE, FROM, TO)
-
#define SLOW_BYTE_ACCESS 0