target-insns.def (indirect_jump): New targetm instruction pattern.
authorRichard Sandiford <richard.sandiford@arm.com>
Tue, 28 Jul 2015 19:50:22 +0000 (19:50 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Tue, 28 Jul 2015 19:50:22 +0000 (19:50 +0000)
gcc/
* target-insns.def (indirect_jump): New targetm instruction pattern.
* optabs.c (emit_indirect_jump): Use it instead of HAVE_*/gen_*
interface.

From-SVN: r226321

gcc/ChangeLog
gcc/optabs.c
gcc/target-insns.def

index d1aca5d38ece9e79c596c39070d1982a95390243..90baee02446943747366cfa6ad972c8e849c88d8 100644 (file)
@@ -1,3 +1,9 @@
+2015-07-28  Richard Sandiford  <richard.sandiford@arm.com>
+
+       * target-insns.def (indirect_jump): New targetm instruction pattern.
+       * optabs.c (emit_indirect_jump): Use it instead of HAVE_*/gen_*
+       interface.
+
 2015-07-28  Richard Sandiford  <richard.sandiford@arm.com>
 
        * config/fr30/fr30.md (indirect_jump): Use pmode_register_operand
index 0719ba2c558ce3cea7da04bccd1babf33e3de4aa..c27e244beb04876c9e26ea420d56a303c055118e 100644 (file)
@@ -4484,16 +4484,15 @@ prepare_float_lib_cmp (rtx x, rtx y, enum rtx_code comparison,
 /* 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
 }
 \f
 
index 4f49ba6cf57735c3dc46e018f45f4d6f87b8cc8b..c125d6873eb15fbf9ebf888906da89a01143b9a1 100644 (file)
@@ -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))