stmt.c (HAVE_casesi): Define it not already defined.

* 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.

From-SVN: r76120
This commit is contained in:
Kazu Hirata 2004-01-18 22:49:23 +00:00 committed by Kazu Hirata
parent 5cfc5f84fb
commit 41cbdcd0a2
2 changed files with 19 additions and 1 deletions

View File

@ -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.

View File

@ -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);