aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/crx
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/crx')
-rw-r--r--gcc/config/crx/crx.c12
-rw-r--r--gcc/config/crx/crx.h3
2 files changed, 12 insertions, 3 deletions
diff --git a/gcc/config/crx/crx.c b/gcc/config/crx/crx.c
index 4aa617f..a0b43a4 100644
--- a/gcc/config/crx/crx.c
+++ b/gcc/config/crx/crx.c
@@ -129,6 +129,7 @@ static rtx crx_struct_value_rtx (tree fntype ATTRIBUTE_UNUSED,
static bool crx_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED);
static int crx_address_cost (rtx, bool);
static bool crx_legitimate_address_p (enum machine_mode, rtx, bool);
+static bool crx_can_eliminate (const int, const int);
/*****************************************************************************/
/* RTL VALIDITY */
@@ -137,6 +138,9 @@ static bool crx_legitimate_address_p (enum machine_mode, rtx, bool);
#undef TARGET_LEGITIMATE_ADDRESS_P
#define TARGET_LEGITIMATE_ADDRESS_P crx_legitimate_address_p
+#undef TARGET_CAN_ELIMINATE
+#define TARGET_CAN_ELIMINATE crx_can_eliminate
+
/*****************************************************************************/
/* STACK LAYOUT AND CALLING CONVENTIONS */
/*****************************************************************************/
@@ -320,6 +324,14 @@ crx_compute_frame (void)
crtl->outgoing_args_size : 0);
}
+/* Worker function for TARGET_CAN_ELIMINATE. */
+
+bool
+crx_can_eliminate (const int from ATTRIBUTE_UNUSED, const int to)
+{
+ return (to == STACK_POINTER_REGNUM ? ! frame_pointer_needed : true);
+}
+
/* Implements the macro INITIAL_ELIMINATION_OFFSET, return the OFFSET. */
int
diff --git a/gcc/config/crx/crx.h b/gcc/config/crx/crx.h
index dcddaf0..ed6d3d6 100644
--- a/gcc/config/crx/crx.h
+++ b/gcc/config/crx/crx.h
@@ -298,9 +298,6 @@ enum reg_class
{ FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM} \
}
-#define CAN_ELIMINATE(FROM, TO) \
- ((TO) == STACK_POINTER_REGNUM ? ! frame_pointer_needed : 1)
-
#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
do { \
(OFFSET) = crx_initial_elimination_offset ((FROM), (TO)); \