summaryrefslogtreecommitdiff
path: root/gcc/bb-reorder.c
diff options
context:
space:
mode:
authorandreast <andreast@138bc75d-0d04-0410-961f-82ee72b054a4>2004-04-14 18:50:53 +0000
committerandreast <andreast@138bc75d-0d04-0410-961f-82ee72b054a4>2004-04-14 18:50:53 +0000
commitfa3d0339abacb5a04cc23bfa975a8e05ca31f876 (patch)
treea9922d959dedca3a25fee194af629c1ebfb331be /gcc/bb-reorder.c
parent5afb5bfcd0d68cbfdc9a07d65c424fc208ff316d (diff)
downloadgcc-fa3d0339abacb5a04cc23bfa975a8e05ca31f876.tar.gz
2004-04-14 Andreas Tobler <a.tobler@schweiz.ch>
* bb-reorder.c (fix_crossing_conditional_branches): Adjust the previous fix to check HAVE_return at runtime too. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@80685 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/bb-reorder.c')
-rw-r--r--gcc/bb-reorder.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c
index 283dc395f6e..2d728078889 100644
--- a/gcc/bb-reorder.c
+++ b/gcc/bb-reorder.c
@@ -78,6 +78,7 @@
#include "fibheap.h"
#include "target.h"
#include "function.h"
+#include "tm_p.h"
#include "obstack.h"
#include "expr.h"
#include "regs.h"
@@ -87,6 +88,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 +1694,10 @@ fix_crossing_conditional_branches (void)
(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 ();