diff options
| -rw-r--r-- | gcc/ChangeLog | 7 | ||||
| -rw-r--r-- | gcc/stmt.c | 13 |
2 files changed, 19 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 566043a..c6cfde6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2004-01-18 Kazu Hirata <kazu@cs.umass.edu> + + * stmt.c (HAVE_casesi): Define it not already defined. + (HAVE_tablejump): Likewise. + (expand_end_case_type): Resort to the binary tree method if + neither casesi or tablejump is available. + 2004-01-18 Daniel Jacobowitz <drow@mvista.com> * final.c (final_scan_insn): Make non-static again. @@ -5342,6 +5342,14 @@ emit_case_bit_tests (tree index_type, tree index_expr, tree minval, emit_jump (default_label); } +#ifndef HAVE_casesi +#define HAVE_casesi 0 +#endif + +#ifndef HAVE_tablejump +#define HAVE_tablejump 0 +#endif + /* Terminate a case (Pascal) or switch (C) statement in which ORIG_INDEX is the expression to be tested. If ORIG_TYPE is not NULL, it is the original ORIG_INDEX @@ -5530,7 +5538,10 @@ expand_end_case_type (tree orig_index, tree orig_type) #ifndef ASM_OUTPUT_ADDR_DIFF_ELT || flag_pic #endif - || TREE_CONSTANT (index_expr)) + || TREE_CONSTANT (index_expr) + /* If neither casesi or tablejump is available, we can + only go this way. */ + || (!HAVE_casesi && !HAVE_tablejump)) { index = expand_expr (index_expr, NULL_RTX, VOIDmode, 0); |
