summaryrefslogtreecommitdiff
path: root/gcc/config/s390
diff options
context:
space:
mode:
authorkrebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4>2014-05-05 07:55:26 +0000
committerkrebbel <krebbel@138bc75d-0d04-0410-961f-82ee72b054a4>2014-05-05 07:55:26 +0000
commit0ac109b5a135aeac95b2ad42e7fbbd241197a931 (patch)
tree17925abdca6968e0293ace7cac7077c037baa800 /gcc/config/s390
parent2f71f48ab6faa28e9ccd2aa93562490567c97645 (diff)
downloadgcc-0ac109b5a135aeac95b2ad42e7fbbd241197a931.tar.gz
2014-05-05 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* target.def: Add new target hook. * doc/tm.texi: Regenerate. * targhooks.h (default_keep_leaf_when_profiled): Add prototype. * targhooks.c (default_keep_leaf_when_profiled): New function. * config/s390/s390.c (s390_keep_leaf_when_profiled): New function. (TARGET_KEEP_LEAF_WHEN_PROFILED): Define. 2014-05-05 Andreas Krebbel <Andreas.Krebbel@de.ibm.com> * gcc.target/s390/leaf-profile.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210061 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/s390')
-rw-r--r--gcc/config/s390/s390.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index cc8f32e169c..557f0dbc6e5 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -10160,6 +10160,14 @@ s390_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED,
return const0_rtx;
}
+/* We call mcount before the function prologue. So a profiled leaf
+ function should stay a leaf function. */
+
+static bool
+s390_keep_leaf_when_profiled ()
+{
+ return true;
+}
/* Output assembly code for the trampoline template to
stdio stream FILE.
@@ -12163,6 +12171,9 @@ s390_option_override (void)
#undef TARGET_LIBCALL_VALUE
#define TARGET_LIBCALL_VALUE s390_libcall_value
+#undef TARGET_KEEP_LEAF_WHEN_PROFILED
+#define TARGET_KEEP_LEAF_WHEN_PROFILED s390_keep_leaf_when_profiled
+
#undef TARGET_FIXED_CONDITION_CODE_REGS
#define TARGET_FIXED_CONDITION_CODE_REGS s390_fixed_condition_code_regs