Continuing after a break for the fr30 patch...

Bootstrapped & regression-tested on x86_64-linux-gnu and aarch64-linux-gnu.
Also tested via config-list.mk.  Committed as preapproved.

Thanks,
Richard


gcc/
        * target-insns.def (indirect_jump): New targetm instruction pattern.
        * optabs.c (emit_indirect_jump): Use it instead of HAVE_*/gen_*
        interface.

Index: gcc/target-insns.def
===================================================================
--- gcc/target-insns.def        2015-07-28 20:34:48.452276705 +0100
+++ gcc/target-insns.def        2015-07-28 20:34:48.444276797 +0100
@@ -44,6 +44,7 @@ DEF_TARGET_INSN (epilogue, (void))
 DEF_TARGET_INSN (exception_receiver, (void))
 DEF_TARGET_INSN (extv, (rtx x0, rtx x1, rtx x2, rtx x3))
 DEF_TARGET_INSN (extzv, (rtx x0, rtx x1, rtx x2, rtx x3))
+DEF_TARGET_INSN (indirect_jump, (rtx x0))
 DEF_TARGET_INSN (insv, (rtx x0, rtx x1, rtx x2, rtx x3))
 DEF_TARGET_INSN (jump, (rtx x0))
 DEF_TARGET_INSN (load_multiple, (rtx x0, rtx x1, rtx x2))
Index: gcc/optabs.c
===================================================================
--- gcc/optabs.c        2015-07-28 20:34:48.452276705 +0100
+++ gcc/optabs.c        2015-07-28 20:34:48.448276751 +0100
@@ -4484,16 +4484,15 @@ prepare_float_lib_cmp (rtx x, rtx y, enu
 /* Generate code to indirectly jump to a location given in the rtx LOC.  */
 
 void
-emit_indirect_jump (rtx loc ATTRIBUTE_UNUSED)
+emit_indirect_jump (rtx loc)
 {
-#ifndef HAVE_indirect_jump
-  sorry ("indirect jumps are not available on this target");
-#else
+  if (!targetm.have_indirect_jump ())
+    sorry ("indirect jumps are not available on this target");
+
   struct expand_operand ops[1];
   create_address_operand (&ops[0], loc);
-  expand_jump_insn (CODE_FOR_indirect_jump, 1, ops);
+  expand_jump_insn (targetm.code_for_indirect_jump, 1, ops);
   emit_barrier ();
-#endif
 }
 
 

Reply via email to