aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/crx/crx.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/crx/crx.c')
-rw-r--r--gcc/config/crx/crx.c12
1 files changed, 12 insertions, 0 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