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] Remove old code in the SPARC backend


 Hi,

  This patch removes some code that was #if 0'd out between 1997 and 1999
in the SPARC backend.

Jim

2004-03-21  James A. Morrison  <ja2morri@uwaterloo.ca>

        * config/sparc/sparc.c (fcc_reg_operand): Remove #if 0'd code.
        (function_arg): Likewise.
        * config/sparc/sparc.md: Likewise

Index: config/sparc/sparc.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/sparc.c,v
retrieving revision 1.295
diff -u -p -r1.295 sparc.c
--- config/sparc/sparc.c	10 Mar 2004 00:17:35 -0000	1.295
+++ config/sparc/sparc.c	21 Mar 2004 19:19:36 -0000
@@ -672,13 +672,7 @@ fcc_reg_operand (rtx op, enum machine_mo
       && (GET_MODE (op) != CCFPmode && GET_MODE (op) != CCFPEmode))
     return 0;
 
-#if 0	/* ??? ==> 1 when %fcc0-3 are pseudos first.  See gen_compare_reg().  */
-  if (reg_renumber == 0)
-    return REGNO (op) >= FIRST_PSEUDO_REGISTER;
-  return REGNO_OK_FOR_CCFP_P (REGNO (op));
-#else
   return (unsigned) REGNO (op) - SPARC_FIRST_V9_FCC_REG < 4;
-#endif
 }
 
 /* Nonzero if OP is a floating point condition code fcc0 register.  */
@@ -5546,20 +5540,6 @@ function_arg (const struct sparc_args *c
 	{
 	  /* "* 2" because fp reg numbers are recorded in 4 byte
 	     quantities.  */
-#if 0
-	  /* ??? This will cause the value to be passed in the fp reg and
-	     in the stack.  When a prototype exists we want to pass the
-	     value in the reg but reserve space on the stack.  That's an
-	     optimization, and is deferred [for a bit].  */
-	  if ((regno - SPARC_FP_ARG_FIRST) >= SPARC_INT_ARG_MAX * 2)
-	    return gen_rtx_PARALLEL (mode,
-			    gen_rtvec (2,
-				       gen_rtx_EXPR_LIST (VOIDmode,
-						NULL_RTX, const0_rtx),
-				       gen_rtx_EXPR_LIST (VOIDmode,
-						reg, const0_rtx)));
-	  else
-#else
 	  /* ??? It seems that passing back a register even when past
 	     the area declared by REG_PARM_STACK_SPACE will allocate
 	     space appropriately, and will not copy the data onto the
@@ -5569,7 +5549,6 @@ function_arg (const struct sparc_args *c
 	     expand_call whenever reg_parm_stack_space > 0, which
 	     while beneficial to our example here, would seem to be
 	     in error from what had been intended.  Ho hum...  -- r~ */
-#endif
 	    return reg;
 	}
       else
Index: config/sparc/sparc.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/sparc.md,v
retrieving revision 1.199
diff -u -p -r1.199 sparc.md
--- config/sparc/sparc.md	26 Feb 2004 18:40:41 -0000	1.199
+++ config/sparc/sparc.md	21 Mar 2004 19:19:39 -0000
@@ -7362,17 +7362,7 @@
 
   fn_rtx = operands[0];
 
-  /* Count the number of parameter registers being used by this call.
-     if that argument is NULL, it means we are using them all, which
-     means 6 on the sparc.  */
-#if 0
-  if (operands[2])
-    nregs_rtx = GEN_INT (REGNO (operands[2]) - 8);
-  else
-    nregs_rtx = GEN_INT (6);
-#else
   nregs_rtx = const0_rtx;
-#endif
 
   if (! TARGET_ARCH64 && INTVAL (operands[3]) != 0)
     emit_call_insn
@@ -7389,15 +7379,6 @@
 		   gen_rtx_CLOBBER (VOIDmode, gen_rtx_REG (Pmode, 15)))));
 
  finish_call:
-#if 0
-  /* If this call wants a structure value,
-     emit an unimp insn to let the called function know about this.  */
-  if (! TARGET_ARCH64 && INTVAL (operands[3]) > 0)
-    {
-      rtx insn = emit_insn (operands[3]);
-      SCHED_GROUP_P (insn) = 1;
-    }
-#endif
 
   DONE;
 })
@@ -7510,14 +7491,7 @@
 
   fn_rtx = operands[1];
 
-#if 0
-  if (operands[3])
-    nregs_rtx = GEN_INT (REGNO (operands[3]) - 8);
-  else
-    nregs_rtx = GEN_INT (6);
-#else
   nregs_rtx = const0_rtx;
-#endif
 
   vec = gen_rtvec (2,
 		   gen_rtx_SET (VOIDmode, operands[0],
@@ -7740,9 +7714,6 @@
    (match_operand:SI 3 "" "")]
   ""
 {
-#if 0
-  rtx chain = operands[0];
-#endif
   rtx lab = operands[1];
   rtx stack = operands[2];
   rtx fp = operands[3];
@@ -7772,21 +7743,6 @@
      really needed.  */
   /*emit_insn (gen_rtx_USE (VOIDmode, frame_pointer_rtx));*/
   emit_insn (gen_rtx_USE (VOIDmode, stack_pointer_rtx));
-
-#if 0
-  /* Return, restoring reg window and jumping to goto handler.  */
-  if (TARGET_V9 && GET_CODE (chain) == CONST_INT
-      && ! (INTVAL (chain) & ~(HOST_WIDE_INT)0xffffffff))
-    {
-      emit_jump_insn (gen_goto_handler_and_restore_v9 (labreg,
-						       static_chain_rtx,
-						       chain));
-      emit_barrier ();
-      DONE;
-    }
-  /* Put in the static chain register the nonlocal label address.  */
-  emit_move_insn (static_chain_rtx, chain);
-#endif
 
   emit_insn (gen_rtx_USE (VOIDmode, static_chain_rtx));
   emit_jump_insn (gen_goto_handler_and_restore (labreg));


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