Save an instruction with -mprofile-kernel style profiling and require
the mcount handler to save the LR to the stack.

-mprofile-kernel is an undocumented gcc option that was introduced
specifically for the Linux kernel, so it should be safe to make this
change. When we do add support for this option in the kernel we plan
to support both the old and new behaviour.

gcc/
2015-04-16  Anton Blanchard  <an...@samba.org>

        * config/rs6000/rs6000.c (rs6000_output_function_prologue):
        No need for -mprofile-kernel to save LR to stack.
---
 gcc/config/rs6000/rs6000.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index a96a774..f85678a 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -24406,7 +24406,6 @@ rs6000_output_function_prologue (FILE *file,
       gcc_assert (!TARGET_32BIT);
 
       asm_fprintf (file, "\tmflr %s\n", reg_names[0]);
-      asm_fprintf (file, "\tstd %s,16(%s)\n", reg_names[0], reg_names[1]);
 
       /* In the ELFv2 ABI we have no compiler stack word.  It must be
         the resposibility of _mcount to preserve the static chain
-- 
2.1.0

Reply via email to