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 5/7] add default for HAVE_load_multiple


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

gcc/ChangeLog:

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

	* defaults.h (gen_load_multiple): New function.
	(HAVE_load_multiple): Add default value.
	* expr.c (move_block_to_reg): Adjust.
---
 gcc/ChangeLog  |  6 ++++++
 gcc/defaults.h | 10 ++++++++++
 gcc/expr.c     |  4 ----
 3 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5e540b6..5d609d4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
 2015-05-23  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
 
+	* defaults.h (gen_load_multiple): New function.
+	(HAVE_load_multiple): Add default value.
+	* expr.c (move_block_to_reg): Adjust.
+
+2015-05-23  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
+
 	* defaults.h (gen_mem_signal_fence): New function.
 	(HAVE_mem_signal_fence): Add default value.
 	* optabs.c: Adjust.
diff --git a/gcc/defaults.h b/gcc/defaults.h
index 50004d5..ea5ff80 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -1474,6 +1474,16 @@ gen_mem_signal_fence (rtx)
 }
 #endif
 
+#ifndef HAVE_load_multiple
+#define HAVE_load_multiple 0
+static inline rtx
+gen_load_multiple (rtx, 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 3605e99..c4b39f4 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -1507,10 +1507,8 @@ void
 move_block_to_reg (int regno, rtx x, int nregs, machine_mode mode)
 {
   int i;
-#ifdef HAVE_load_multiple
   rtx pat;
   rtx_insn *last;
-#endif
 
   if (nregs == 0)
     return;
@@ -1519,7 +1517,6 @@ move_block_to_reg (int regno, rtx x, int nregs, machine_mode mode)
     x = validize_mem (force_const_mem (mode, x));
 
   /* See if the machine can do this with a load multiple insn.  */
-#ifdef HAVE_load_multiple
   if (HAVE_load_multiple)
     {
       last = get_last_insn ();
@@ -1533,7 +1530,6 @@ move_block_to_reg (int regno, rtx x, int nregs, machine_mode mode)
       else
 	delete_insns_since (last);
     }
-#endif
 
   for (i = 0; i < nregs; i++)
     emit_move_insn (gen_rtx_REG (word_mode, regno + i),
-- 
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]