aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@codesourcery.com>2005-05-11 14:59:09 +0000
committerDaniel Jacobowitz <drow@gcc.gnu.org>2005-05-11 14:59:09 +0000
commita15900b51c9fe3a9727a8e3575cfad0fe39c303f (patch)
treefea0f185142e9be19cd5ff9422433358d1c01e43
parent09e7f68631c07f882a1294d4f00c5cf19498786e (diff)
downloadgcc-a15900b51c9fe3a9727a8e3575cfad0fe39c303f.zip
gcc-a15900b51c9fe3a9727a8e3575cfad0fe39c303f.tar.gz
gcc-a15900b51c9fe3a9727a8e3575cfad0fe39c303f.tar.bz2
linux-elf.h (SUBTARGET_FRAME_POINTER_REQUIRED): Define.
* config/arm/linux-elf.h (SUBTARGET_FRAME_POINTER_REQUIRED): Define. * config/arm/arm.h (SUBTARGET_FRAME_POINTER_REQUIRED): Provide default definition. (FRAME_POINTER_REQUIRED): Use SUBTARGET_FRAME_POINTER_REQUIRED. From-SVN: r99581
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/arm/arm.h6
-rw-r--r--gcc/config/arm/linux-elf.h5
3 files changed, 17 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 46ac68c..c026bf3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2005-05-11 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * config/arm/linux-elf.h (SUBTARGET_FRAME_POINTER_REQUIRED): Define.
+ * config/arm/arm.h (SUBTARGET_FRAME_POINTER_REQUIRED): Provide
+ default definition.
+ (FRAME_POINTER_REQUIRED): Use SUBTARGET_FRAME_POINTER_REQUIRED.
+
2005-05-11 Nathan Sidwell <nathan@codesourcery.com>
PR bootstrap/21481
diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h
index 1e5a972..b75d89a 100644
--- a/gcc/config/arm/arm.h
+++ b/gcc/config/arm/arm.h
@@ -861,8 +861,14 @@ extern int arm_structure_size_boundary;
If we have to have a frame pointer we might as well make use of it.
APCS says that the frame pointer does not need to be pushed in leaf
functions, or simple tail call functions. */
+
+#ifndef SUBTARGET_FRAME_POINTER_REQUIRED
+#define SUBTARGET_FRAME_POINTER_REQUIRED 0
+#endif
+
#define FRAME_POINTER_REQUIRED \
(current_function_has_nonlocal_label \
+ || SUBTARGET_FRAME_POINTER_REQUIRED \
|| (TARGET_ARM && TARGET_APCS_FRAME && ! leaf_function_p ()))
/* Return number of consecutive hard regs needed starting at reg REGNO
diff --git a/gcc/config/arm/linux-elf.h b/gcc/config/arm/linux-elf.h
index 48b0f01..b609a81 100644
--- a/gcc/config/arm/linux-elf.h
+++ b/gcc/config/arm/linux-elf.h
@@ -128,11 +128,14 @@
(TARGET_ARM && NEED_PLT_RELOC) ? "(PLT)" : ""); \
}
-/* The linux profiler clobbers the link register. Make sure the
+/* The GNU/Linux profiler clobbers the link register. Make sure the
prologue knows to save it. */
#define PROFILE_HOOK(X) \
emit_insn (gen_rtx_CLOBBER (VOIDmode, gen_rtx_REG (SImode, LR_REGNUM)))
+/* The GNU/Linux profiler needs a frame pointer. */
+#define SUBTARGET_FRAME_POINTER_REQUIRED current_function_profile
+
#undef CC1_SPEC
#define CC1_SPEC "%{profile:-p}"