public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: [patch] s390 tpf adjustment
@ 2004-06-11 14:21 Ulrich Weigand
  0 siblings, 0 replies; 5+ messages in thread
From: Ulrich Weigand @ 2004-06-11 14:21 UTC (permalink / raw)
  To: Eric Christopher, Philip Darcy; +Cc: gcc-patches





Eric Christopher wrote:

>We need to make sure and setup the frame and save area when we're
>profiling. Also, per a discussion with Ulrich I've switched the
>conditional from TARGET_TPF to TARGET_TPF_PROFILING, I can't remember if
>Ulrich wanted me to switch the option name though.
>
>So, OK? Switch the option name?

This patch is OK with me, assuming it was tested on TPF.

PJ, what is your opinion on the option name?


Mit freundlichen Gruessen / Best Regards

Ulrich Weigand

--
  Dr. Ulrich Weigand
  Linux for S/390 Design & Development
  IBM Deutschland Entwicklung GmbH, Schoenaicher Str. 220, 71032 Boeblingen
  Phone: +49-7031/16-3727   ---   Email: Ulrich.Weigand@de.ibm.com

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

* Re: [patch] s390 tpf adjustment
@ 2004-06-11 19:59 Ulrich Weigand
  0 siblings, 0 replies; 5+ messages in thread
From: Ulrich Weigand @ 2004-06-11 19:59 UTC (permalink / raw)
  To: Eric Christopher; +Cc: Philip Darcy, gcc-patches





Eric Christopher wrote:

>> I'd appreciate it if this change were tested before it's applied,
>> for that reason.
>
>This part Philip has tested :)

The patch is OK then.  Thanks!


Mit freundlichen Gruessen / Best Regards

Ulrich Weigand

--
  Dr. Ulrich Weigand
  Linux for S/390 Design & Development
  IBM Deutschland Entwicklung GmbH, Schoenaicher Str. 220, 71032 Boeblingen
  Phone: +49-7031/16-3727   ---   Email: Ulrich.Weigand@de.ibm.com

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

* Re: [patch] s390 tpf adjustment
  2004-06-11 14:54 Ulrich Weigand
@ 2004-06-11 19:45 ` Eric Christopher
  0 siblings, 0 replies; 5+ messages in thread
From: Eric Christopher @ 2004-06-11 19:45 UTC (permalink / raw)
  To: Ulrich Weigand; +Cc: Philip Darcy, gcc-patches


> I'd appreciate it if this change were tested before it's applied,
> for that reason.

This part Philip has tested :)

-eric

-- 
Eric Christopher <echristo@redhat.com>

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

* Re: [patch] s390 tpf adjustment
@ 2004-06-11 14:54 Ulrich Weigand
  2004-06-11 19:45 ` Eric Christopher
  0 siblings, 1 reply; 5+ messages in thread
From: Ulrich Weigand @ 2004-06-11 14:54 UTC (permalink / raw)
  To: Philip Darcy; +Cc: Eric Christopher, gcc-patches





PJ Darcy wrote:

>If I recall correctly, we actually discussed separating some behaviors
>into an -mtpf and an -mprofiling-tpf, is that correct?  It kind of seems
>now that just about all of the current behavior _is_ based on the
profiling,
>and the rest of the behavior we wanted was put into the target build.
>
>If this is the case, and we do not plan on separating behaviors into more
>than one option, I would request that we just leave the option name as it
is.

Actually, my understanding has been that all behaviour required simply
because we run on TPF should be triggered solely from the s390x-ibm-tpf
target name, and not require any option.

The only behaviour triggered via an option should be the profiling
support (which actually *is* optional).  In that case, the option name
should reflect this (-mtpf is misleading IMO as at appears to imply
you should/must always specify that option when building for TPF).

>We have not tested the guard macro change - but if it's a global
>substitution, then it looks fine to me.  It's up to the two of you
>to apply it now or wait for us to give it a go with some testing.

Note that this patch does not *solely* change the macro name, there
is also a functional change involved: we now set up a stack frame
in *all* functions, even those that wouldn't really need it (i.e.
leaf functions), so that profiling works also in leaf functions.
(Eric tells me this is required by the TPF profiling code ...)

I'd appreciate it if this change were tested before it's applied,
for that reason.


Mit freundlichen Gruessen / Best Regards

Ulrich Weigand

--
  Dr. Ulrich Weigand
  Linux for S/390 Design & Development
  IBM Deutschland Entwicklung GmbH, Schoenaicher Str. 220, 71032 Boeblingen
  Phone: +49-7031/16-3727   ---   Email: Ulrich.Weigand@de.ibm.com

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

* [patch] s390 tpf adjustment
@ 2004-06-10  0:08 Eric Christopher
  0 siblings, 0 replies; 5+ messages in thread
From: Eric Christopher @ 2004-06-10  0:08 UTC (permalink / raw)
  To: gcc-patches; +Cc: uweigand

We need to make sure and setup the frame and save area when we're
profiling. Also, per a discussion with Ulrich I've switched the
conditional from TARGET_TPF to TARGET_TPF_PROFILING, I can't remember if
Ulrich wanted me to switch the option name though.

So, OK? Switch the option name?

-eric

-- 
Eric Christopher <echristo@redhat.com>

2004-06-09  Eric Christopher  <echristo@redhat.com>

	* config/s390/s390.h: Rename TARGET_TPF to TARGET_TPF_PROFILING.
	* config/s390/s390.md: Ditto.
	* config/s390/s390.c: Ditto.
	(s390_frame_info): Conditionalize frame and setup info on 
	TARGET_TPF_PROFILING.
	(s390_arg_frame_offset): Ditto.

Index: s390.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/s390/s390.c,v
retrieving revision 1.146
diff -u -p -w -r1.146 s390.c
--- s390.c	18 May 2004 14:43:58 -0000	1.146
+++ s390.c	9 Jun 2004 22:53:51 -0000
@@ -5280,6 +5280,7 @@ s390_frame_info (void)
   /* Does function need to setup frame and save area.  */
 
   if (! current_function_is_leaf
+      || TARGET_TPF_PROFILING
       || cfun->machine->frame_size > 0
       || current_function_calls_alloca
       || current_function_stdarg)
@@ -5289,6 +5290,7 @@ s390_frame_info (void)
      it is going to be saved/restored.  */
 
   if (!current_function_is_leaf
+      || TARGET_TPF_PROFILING
       || regs_ever_live[RETURN_REGNUM])
     cfun->machine->save_return_addr_p = 1;
 
@@ -5356,6 +5358,7 @@ s390_arg_frame_offset (void)
   /* Does function need to setup frame and save area.  */
 
   if (! current_function_is_leaf
+      || TARGET_TPF_PROFILING
       || fsize > 0
       || current_function_calls_alloca
       || current_function_stdarg)
@@ -5557,7 +5560,7 @@ s390_emit_prologue (void)
      See below for why TPF must use the register 1.  */
 
   if (!current_function_is_leaf
-      && !TARGET_TPF)
+      && !TARGET_TPF_PROFILING)
     temp_reg = gen_rtx_REG (Pmode, RETURN_REGNUM);
   else
     temp_reg = gen_rtx_REG (Pmode, 1);
@@ -5682,7 +5685,7 @@ s390_emit_prologue (void)
   if (flag_pic && regs_ever_live[PIC_OFFSET_TABLE_REGNUM])
     s390_load_got(true);
 
-  if (TARGET_TPF)
+  if (TARGET_TPF_PROFILING)
     {
       /* Generate a BAS instruction to serve as a function
 	 entry intercept to facilitate the use of tracing
@@ -5705,7 +5708,7 @@ s390_emit_epilogue (bool sibcall)
   rtvec p;
   int i;
 
-  if (TARGET_TPF)
+  if (TARGET_TPF_PROFILING)
     {
 
       /* Generate a BAS instruction to serve as a function
@@ -7074,7 +7077,7 @@ static bool
 s390_function_ok_for_sibcall (tree decl, tree exp)
 {
   /* The TPF epilogue uses register 1.  */
-  if (TARGET_TPF)
+  if (TARGET_TPF_PROFILING)
     return false;
 
   /* The 31 bit PLT code uses register 12 (GOT pointer - caller saved)
Index: s390.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/s390/s390.h,v
retrieving revision 1.103
diff -u -p -w -r1.103 s390.h
--- s390.h	4 May 2004 01:16:47 -0000	1.103
+++ s390.h	9 Jun 2004 22:53:51 -0000
@@ -95,7 +95,7 @@ extern int target_flags;
 #define MASK_64BIT                 0x10
 #define MASK_ZARCH                 0x20
 #define MASK_MVCLE                 0x40
-#define MASK_TPF                   0x80
+#define MASK_TPF_PROFILING         0x80
 #define MASK_NO_FUSED_MADD         0x100
 
 #define TARGET_HARD_FLOAT          (target_flags & MASK_HARD_FLOAT)
@@ -106,7 +106,7 @@ extern int target_flags;
 #define TARGET_64BIT               (target_flags & MASK_64BIT)
 #define TARGET_ZARCH               (target_flags & MASK_ZARCH)
 #define TARGET_MVCLE               (target_flags & MASK_MVCLE)
-#define TARGET_TPF                 (target_flags & MASK_TPF)
+#define TARGET_TPF_PROFILING       (target_flags & MASK_TPF_PROFILING)
 #define TARGET_NO_FUSED_MADD       (target_flags & MASK_NO_FUSED_MADD)
 #define TARGET_FUSED_MADD	   (! TARGET_NO_FUSED_MADD)
 
Index: s390.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/s390/s390.md,v
retrieving revision 1.109
diff -u -p -w -r1.109 s390.md
--- s390.md	4 May 2004 01:20:40 -0000	1.109
+++ s390.md	9 Jun 2004 22:53:52 -0000
@@ -7529,7 +7529,7 @@
 (define_insn "prologue_tpf"
   [(unspec_volatile [(const_int 0)] UNSPECV_TPF_PROLOGUE)
    (clobber (reg:DI 1))]
-  "TARGET_TPF"
+  "TARGET_TPF_PROFILING"
   "bas\t%%r1,4064"
   [(set_attr "type" "jsr")
    (set_attr "op_type" "RX")])
@@ -7542,7 +7542,7 @@
 (define_insn "epilogue_tpf"
   [(unspec_volatile [(const_int 0)] UNSPECV_TPF_EPILOGUE)
    (clobber (reg:DI 1))]
-  "TARGET_TPF"
+  "TARGET_TPF_PROFILING"
   "bas\t%%r1,4070"
   [(set_attr "type" "jsr")
    (set_attr "op_type" "RX")])


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

end of thread, other threads:[~2004-06-11 18:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-11 14:21 [patch] s390 tpf adjustment Ulrich Weigand
  -- strict thread matches above, loose matches on Subject: below --
2004-06-11 19:59 Ulrich Weigand
2004-06-11 14:54 Ulrich Weigand
2004-06-11 19:45 ` Eric Christopher
2004-06-10  0:08 Eric Christopher

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).