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]

[tree-ssa] Replace "current_function_needs_context" with"cfun->static_chain_decl != NULL". (PR target/14285)


Hi,

Attached is a patch to restore builds of those ports mentioned below.

Built cc1 of each port-elf.  OK to apply?

Kazu Hirata

2004-02-24  Kazu Hirata  <kazu@cs.umass.edu>

	PR target/14285
	* config/arm/arm.c (arm_compute_func_type): Replace
	"current_function_needs_context" with "cfun->static_chain_decl
	!= NULL".
	(arm_compute_initial_elimination_offset): Likewise.
	* config/h8300/h8300.c (h8300_emit_stack_adjustment):
	Likewise.
	* config/sh/sh.c (output_stack_adjust): Likewise.
	(sh5_schedule_saves): Likewise.
	* config/xtensa/xtensa.c (compute_frame_size): Likewise.

Index: arm/arm.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/arm/arm.c,v
retrieving revision 1.212.2.37
diff -u -p -r1.212.2.37 arm.c
--- arm/arm.c	13 Feb 2004 13:12:06 -0000	1.212.2.37
+++ arm/arm.c	25 Feb 2004 03:10:16 -0000
@@ -1061,7 +1061,7 @@ arm_compute_func_type (void)
       && TREE_THIS_VOLATILE (current_function_decl))
     type |= ARM_FT_VOLATILE;
   
-  if (current_function_needs_context)
+  if (cfun->static_chain_decl != NULL)
     type |= ARM_FT_NESTED;
 
   attr = DECL_ATTRIBUTES (current_function_decl);
@@ -9816,7 +9816,7 @@ arm_compute_initial_elimination_offset (
 	    return 0;
 	  /* FIXME:  Not sure about this.  Maybe we should always return 0 ?  */
 	  return (frame_pointer_needed
-		  && current_function_needs_context
+		  && cfun->static_chain_decl != NULL
 		  && ! cfun->machine->uses_anonymous_args) ? 4 : 0;
 
 	case STACK_POINTER_REGNUM:
Index: h8300/h8300.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/h8300/h8300.c,v
retrieving revision 1.134.2.32
diff -u -p -r1.134.2.32 h8300.c
--- h8300/h8300.c	13 Feb 2004 13:12:20 -0000	1.134.2.32
+++ h8300/h8300.c	25 Feb 2004 03:10:17 -0000
@@ -376,7 +376,7 @@ h8300_emit_stack_adjustment (int sign, u
   if (TARGET_H8300
       && size > 4
       && !h8300_current_function_interrupt_function_p ()
-      && !(current_function_needs_context && sign < 0))
+      && !(cfun->static_chain_decl != NULL && sign < 0))
     {
       rtx new_sp;
       rtx r3 = gen_rtx_REG (Pmode, 3);
Index: sh/sh.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sh/sh.c,v
retrieving revision 1.153.2.32
diff -u -p -r1.153.2.32 sh.c
--- sh/sh.c	13 Feb 2004 13:13:14 -0000	1.153.2.32
+++ sh/sh.c	25 Feb 2004 03:10:22 -0000
@@ -4598,7 +4598,7 @@ output_stack_adjust (int size, rtx reg, 
 		  for (i = FIRST_PARM_REG;
 		       i < FIRST_PARM_REG + NPARM_REGS (SImode); i++)
 		    CLEAR_HARD_REG_BIT (temps, i);
-		  if (current_function_needs_context)
+		  if (cfun->static_chain_decl != NULL)
 		    CLEAR_HARD_REG_BIT (temps, STATIC_CHAIN_REGNUM);
 		}
 	      temp = scavenge_reg (&temps);
@@ -5007,7 +5007,7 @@ sh5_schedule_saves (HARD_REG_SET *live_r
       if (call_used_regs[i] && ! fixed_regs[i] && i != PR_MEDIA_REG
 	  && ! FUNCTION_ARG_REGNO_P (i)
 	  && i != FIRST_RET_REG
-	  && ! (current_function_needs_context && i == STATIC_CHAIN_REGNUM)
+	  && ! (cfun->static_chain_decl != NULL && i == STATIC_CHAIN_REGNUM)
 	  && ! (current_function_calls_eh_return
 		&& (i == EH_RETURN_STACKADJ_REGNO
 		    || ((unsigned)i <= EH_RETURN_DATA_REGNO (0)
Index: xtensa/xtensa.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/xtensa/xtensa.c,v
retrieving revision 1.15.2.20
diff -u -p -r1.15.2.20 xtensa.c
--- xtensa/xtensa.c	13 Feb 2004 13:13:25 -0000	1.15.2.20
+++ xtensa/xtensa.c	25 Feb 2004 03:10:23 -0000
@@ -2211,7 +2211,7 @@ long
 compute_frame_size (int size)
 {
   /* Add space for the incoming static chain value.  */
-  if (current_function_needs_context)
+  if (cfun->static_chain_decl != NULL)
     size += (1 * UNITS_PER_WORD);
 
   xtensa_current_frame_size =


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