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]

Re: PATCH fix bootstrap on solaris (part one)


Richard Henderson wrote:

On Tue, Apr 13, 2004 at 10:04:59PM +0200, Andreas Tobler wrote:

And then around the gen_ret call an if(HAVE_return)?


Yes.

Ok, I have this one in the test chain, solaris & linuxppc. I added a comment that I (we) don't accidentally remove it again :)

Andreas

Index: gcc/bb-reorder.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/bb-reorder.c,v
retrieving revision 1.69
diff -u -r1.69 bb-reorder.c
--- gcc/bb-reorder.c	13 Apr 2004 23:30:24 -0000	1.69
+++ gcc/bb-reorder.c	14 Apr 2004 04:26:02 -0000
@@ -87,6 +87,15 @@
    the .o file there will be an extra round.*/
 #define N_ROUNDS 5
 
+/* Stubs in case we don't have a return insn.
+   We have to check at runtime too, not only compiletime.  */  
+
+#ifndef HAVE_return
+#define HAVE_return 0
+#define gen_return() NULL_RTX
+#endif
+
+
 /* Branch thresholds in thousandths (per mille) of the REG_BR_PROB_BASE.  */
 static int branch_threshold[N_ROUNDS] = {400, 200, 100, 0, 0};
 
@@ -1684,11 +1693,10 @@
 						       (old_label), 
 						       BB_END (new_bb));
 		    }
-#ifdef HAVE_return
-		  else if (GET_CODE (old_label) == RETURN)
+		  else if (HAVE_return && 
+			   GET_CODE (old_label) == RETURN)
 		    new_jump = emit_jump_insn_after (gen_return (), 
 						     BB_END (new_bb));
-#endif
 		  else
 		    abort ();
 		  

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