public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] s390: New mcount call sequence for z900+ CPUs in 31-bit mode.
@ 2016-01-21 13:03 Marcin Kościelnicki
  2016-02-15 11:39 ` Marcin Kościelnicki
  2016-02-15 11:49 ` Andreas Krebbel
  0 siblings, 2 replies; 3+ messages in thread
From: Marcin Kościelnicki @ 2016-01-21 13:03 UTC (permalink / raw)
  To: gcc-patches, krebbel; +Cc: Marcin Kościelnicki

On TARGET_CPU_ZARCH && !TARGET_64BIT, we can use a similiar lean mcount
call sequence to TARGET_64BIT.  The longer sequences are now used only
on deprecated g5/g6 CPUs.

Tested on s390-ibm-linux-gnu on RHEL 7.2.

gcc/ChangeLog:

	* config/s390/s390.c (s390_function_profiler): Add a new sequence
	for z900+ CPUs in 31-bit mode.
---
This change was mentioned in the s390 split-stack thread.

 gcc/ChangeLog          | 5 +++++
 gcc/config/s390/s390.c | 7 +++++++
 2 files changed, 12 insertions(+)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0e77409..94b9bd0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2016-01-21  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-01-21  Richard Biener  <rguenther@suse.de>
 
 	* graphite-optimize-isl.c (get_schedule_map): Fix typo.
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index 3be64de..eb26f18 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -11974,6 +11974,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 ();
-- 
2.7.0

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] s390: New mcount call sequence for z900+ CPUs in 31-bit mode.
  2016-01-21 13:03 [PATCH] s390: New mcount call sequence for z900+ CPUs in 31-bit mode Marcin Kościelnicki
@ 2016-02-15 11:39 ` Marcin Kościelnicki
  2016-02-15 11:49 ` Andreas Krebbel
  1 sibling, 0 replies; 3+ messages in thread
From: Marcin Kościelnicki @ 2016-02-15 11:39 UTC (permalink / raw)
  To: gcc-patches, krebbel

On 21/01/16 14:03, Marcin Kościelnicki wrote:
> On TARGET_CPU_ZARCH && !TARGET_64BIT, we can use a similiar lean mcount
> call sequence to TARGET_64BIT.  The longer sequences are now used only
> on deprecated g5/g6 CPUs.
>
> Tested on s390-ibm-linux-gnu on RHEL 7.2.
>
> gcc/ChangeLog:
>
> 	* config/s390/s390.c (s390_function_profiler): Add a new sequence
> 	for z900+ CPUs in 31-bit mode.
> ---
> This change was mentioned in the s390 split-stack thread.
>
>   gcc/ChangeLog          | 5 +++++
>   gcc/config/s390/s390.c | 7 +++++++
>   2 files changed, 12 insertions(+)
>
> diff --git a/gcc/ChangeLog b/gcc/ChangeLog
> index 0e77409..94b9bd0 100644
> --- a/gcc/ChangeLog
> +++ b/gcc/ChangeLog
> @@ -1,3 +1,8 @@
> +2016-01-21  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-01-21  Richard Biener  <rguenther@suse.de>
>
>   	* graphite-optimize-isl.c (get_schedule_map): Fix typo.
> diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
> index 3be64de..eb26f18 100644
> --- a/gcc/config/s390/s390.c
> +++ b/gcc/config/s390/s390.c
> @@ -11974,6 +11974,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 ();
>


Ping?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] s390: New mcount call sequence for z900+ CPUs in 31-bit mode.
  2016-01-21 13:03 [PATCH] s390: New mcount call sequence for z900+ CPUs in 31-bit mode Marcin Kościelnicki
  2016-02-15 11:39 ` Marcin Kościelnicki
@ 2016-02-15 11:49 ` Andreas Krebbel
  1 sibling, 0 replies; 3+ messages in thread
From: Andreas Krebbel @ 2016-02-15 11:49 UTC (permalink / raw)
  To: Marcin Kościelnicki, gcc-patches

On 01/21/2016 02:03 PM, Marcin Kościelnicki wrote:
> gcc/ChangeLog:
> 
> 	* config/s390/s390.c (s390_function_profiler): Add a new sequence
> 	for z900+ CPUs in 31-bit mode.

Applied. Thanks!

-Andreas-


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-02-15 11:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-21 13:03 [PATCH] s390: New mcount call sequence for z900+ CPUs in 31-bit mode Marcin Kościelnicki
2016-02-15 11:39 ` Marcin Kościelnicki
2016-02-15 11:49 ` Andreas Krebbel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).