aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRamana Radhakrishnan <ramana.radhakrishnan@arm.com>2009-04-13 08:25:55 +0000
committerRamana Radhakrishnan <ramana@gcc.gnu.org>2009-04-13 08:25:55 +0000
commit934c2060de32e45e0f8ccce8af5b7592db3bd53b (patch)
tree8ba1fe7ac5e2299d73bbf209809f692620b82a56
parentae5cc016954e66b3b837dd705f3bc9b3b6cc5367 (diff)
downloadgcc-934c2060de32e45e0f8ccce8af5b7592db3bd53b.zip
gcc-934c2060de32e45e0f8ccce8af5b7592db3bd53b.tar.gz
gcc-934c2060de32e45e0f8ccce8af5b7592db3bd53b.tar.bz2
arm.c (return_used_this_function): Remove.
2009-04-13 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> * config/arm/arm.c (return_used_this_function): Remove. (arm_output_function_prologue): Remove use of return_used_this_function. (output_return_instruction): Replace use of return_used_this_function by cfun->machine->return_used_this_function. (arm_output_epilogue): Likewise. (arm_output_function_epilogue): Likewise. (thumb_unexpanded_epilogue): Likewise. * config/arm/arm.h (struct machine_function): New member return_used_this_function. From-SVN: r145997
-rw-r--r--gcc/ChangeLog14
-rw-r--r--gcc/config/arm/arm.c16
-rw-r--r--gcc/config/arm/arm.h3
3 files changed, 23 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3c9d910..0544dd6 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,17 @@
+2009-04-13 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
+
+ * config/arm/arm.c (return_used_this_function): Remove.
+ (arm_output_function_prologue): Remove use of
+ return_used_this_function.
+ (output_return_instruction): Replace use of
+ return_used_this_function
+ by cfun->machine->return_used_this_function.
+ (arm_output_epilogue): Likewise.
+ (arm_output_function_epilogue): Likewise.
+ (thumb_unexpanded_epilogue): Likewise.
+ * config/arm/arm.h (struct machine_function):
+ New member return_used_this_function.
+
2009-04-12 Mark Mitchell <mark@codesourcery.com>
* doc/install.texi: Correct description of default directory for
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 662e7de..e24f3c7 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -582,10 +582,6 @@ enum machine_mode output_memory_reference_mode;
/* The register number to be used for the PIC offset register. */
unsigned arm_pic_register = INVALID_REGNUM;
-/* Set to 1 when a return insn is output, this means that the epilogue
- is not needed. */
-int return_used_this_function;
-
/* Set to 1 after arm_reorg has started. Reset to start at the start of
the next function. */
static int after_arm_reorg = 0;
@@ -11618,7 +11614,7 @@ output_return_instruction (rtx operand, int really_return, int reverse)
sprintf (conditional, "%%?%%%c0", reverse ? 'D' : 'd');
- return_used_this_function = 1;
+ cfun->machine->return_used_this_function = 1;
offsets = arm_get_frame_offsets ();
live_regs_mask = offsets->saved_regs_mask;
@@ -11883,7 +11879,6 @@ arm_output_function_prologue (FILE *f, HOST_WIDE_INT frame_size)
if (crtl->calls_eh_return)
asm_fprintf (f, "\t@ Calls __builtin_eh_return.\n");
- return_used_this_function = 0;
}
const char *
@@ -11904,7 +11899,8 @@ arm_output_epilogue (rtx sibling)
/* If we have already generated the return instruction
then it is futile to generate anything else. */
- if (use_return_insn (FALSE, sibling) && return_used_this_function)
+ if (use_return_insn (FALSE, sibling) &&
+ (cfun->machine->return_used_this_function != 0))
return "";
func_type = arm_current_func_type ();
@@ -12351,7 +12347,7 @@ arm_output_function_epilogue (FILE *file ATTRIBUTE_UNUSED,
/* ??? Probably not safe to set this here, since it assumes that a
function will be emitted as assembly immediately after we generate
RTL for it. This does not happen for inline functions. */
- return_used_this_function = 0;
+ cfun->machine->return_used_this_function = 0;
}
else /* TARGET_32BIT */
{
@@ -12359,7 +12355,7 @@ arm_output_function_epilogue (FILE *file ATTRIBUTE_UNUSED,
offsets = arm_get_frame_offsets ();
gcc_assert (!use_return_insn (FALSE, NULL)
- || !return_used_this_function
+ || (cfun->machine->return_used_this_function != 0)
|| offsets->saved_regs == offsets->outgoing_args
|| frame_pointer_needed);
@@ -17300,7 +17296,7 @@ thumb_unexpanded_epilogue (void)
int had_to_push_lr;
int size;
- if (return_used_this_function)
+ if (cfun->machine->return_used_this_function != 0)
return "";
if (IS_NAKED (arm_current_func_type ()))
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index f5ec9e7..a44b403 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -1610,6 +1610,9 @@ typedef struct machine_function GTY(())
register. We can never call via LR or PC. We can call via SP if a
trampoline happens to be on the top of the stack. */
rtx call_via[14];
+ /* Set to 1 when a return insn is output, this means that the epilogue
+ is not needed. */
+ int return_used_this_function;
}
machine_function;