This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] s390 tpf adjustment


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")])



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]