diff options
author | Kazu Hirata <kazu@cs.umass.edu> | 2004-01-18 22:49:23 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@gcc.gnu.org> | 2004-01-18 22:49:23 +0000 |
commit | 41cbdcd0a240a38b741290576bfda22bab62a656 (patch) | |
tree | e0b753619973c633deb46d2c9b655b8c3fc014c7 /gcc/stmt.c | |
parent | 5cfc5f84fbd2ec29b1ac0cdba44ff468c82f48fe (diff) | |
download | gcc-41cbdcd0a240a38b741290576bfda22bab62a656.zip gcc-41cbdcd0a240a38b741290576bfda22bab62a656.tar.gz gcc-41cbdcd0a240a38b741290576bfda22bab62a656.tar.bz2 |
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
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r-- | gcc/stmt.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -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); |