S/390: New mcount call sequence for z900+ CPUs in 31-bit mode.
authorMarcin Kościelnicki <koriakin@0x04.net>
Mon, 15 Feb 2016 11:48:28 +0000 (11:48 +0000)
committerAndreas Krebbel <krebbel@gcc.gnu.org>
Mon, 15 Feb 2016 11:48:28 +0000 (11:48 +0000)
gcc/ChangeLog:

2016-02-15  Marcin Kościelnicki  <koriakin@0x04.net>

* config/s390/s390.c (s390_function_profiler): Add a new sequence
for z900+ CPUs in 31-bit mode.

From-SVN: r233422

gcc/ChangeLog
gcc/config/s390/s390.c

index cf178e7..45f7b6e 100644 (file)
@@ -1,5 +1,10 @@
 2016-02-15  Marcin Kościelnicki  <koriakin@0x04.net>
 
+       * config/s390/s390.c (s390_function_profiler): Add a new sequence
+       for z900+ CPUs in 31-bit mode.
+
+2016-02-15  Marcin Kościelnicki  <koriakin@0x04.net>
+
        * common/config/s390/s390-common.c (s390_supports_split_stack):
        New function.
        (TARGET_SUPPORTS_SPLIT_STACK): New macro.
index aa82d1c..b1ab0c0 100644 (file)
@@ -12205,6 +12205,13 @@ s390_function_profiler (FILE *file, int labelno)
       output_asm_insn ("brasl\t%0,%4", op);
       output_asm_insn ("lg\t%0,%1", op);
     }
+  else if (TARGET_CPU_ZARCH)
+    {
+      output_asm_insn ("st\t%0,%1", op);
+      output_asm_insn ("larl\t%2,%3", op);
+      output_asm_insn ("brasl\t%0,%4", op);
+      output_asm_insn ("l\t%0,%1", op);
+    }
   else if (!flag_pic)
     {
       op[6] = gen_label_rtx ();