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]

[PATCH 7/7] add default for HAVE_tablejump


From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>

gcc/ChangeLog:

2015-05-23  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* defaults.h (gen_tablejump): New function.
	(HAVE_tablejump): Add default value.
	* expr.c: Adjust.
	* stmt.c: Likewise.
---
 gcc/ChangeLog  |  7 +++++++
 gcc/defaults.h | 10 ++++++++++
 gcc/expr.c     |  5 -----
 gcc/stmt.c     |  4 ----
 4 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 99ee6dd..864ce02 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,12 @@
 2015-05-23  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
 
+	* defaults.h (gen_tablejump): New function.
+	(HAVE_tablejump): Add default value.
+	* expr.c: Adjust.
+	* stmt.c: Likewise.
+
+2015-05-23  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
+
 	* defaults.h (gen_store_multiple): New function.
 	(HAVE_store_multiple): Add default value.
 	* expr.c (move_block_from_reg): Adjust.
diff --git a/gcc/defaults.h b/gcc/defaults.h
index 566841b..53d6682 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -1494,6 +1494,16 @@ gen_store_multiple (rtx, rtx, rtx)
 }
 #endif
 
+#ifndef HAVE_tablejump
+#define HAVE_tablejump 0
+static inline rtx
+gen_tablejump (rtx, rtx)
+{
+  gcc_unreachable ();
+  return NULL;
+}
+#endif
+
 #endif /* GCC_INSN_FLAGS_H  */
 
 #endif  /* ! GCC_DEFAULTS_H */
diff --git a/gcc/expr.c b/gcc/expr.c
index 0dad737..dccaf8b 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -11226,11 +11226,6 @@ try_casesi (tree index_type, tree index_expr, tree minval, tree range,
 }
 
 /* Attempt to generate a tablejump instruction; same concept.  */
-#ifndef HAVE_tablejump
-#define HAVE_tablejump 0
-#define gen_tablejump(x, y) (0)
-#endif
-
 /* Subroutine of the next function.
 
    INDEX is the value being switched on, with the lowest value
diff --git a/gcc/stmt.c b/gcc/stmt.c
index 16a080a..303df72 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -796,10 +796,6 @@ dump_case_nodes (FILE *f, struct case_node *root,
 #define HAVE_casesi 0
 #endif
 
-#ifndef HAVE_tablejump
-#define HAVE_tablejump 0
-#endif
-
 /* Return the smallest number of different values for which it is best to use a
    jump-table instead of a tree of conditional branches.  */
 
-- 
2.4.0.78.g7c6ecbf


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