From: Richard Sandiford Date: Tue, 28 Jul 2015 19:50:22 +0000 (+0000) Subject: target-insns.def (indirect_jump): New targetm instruction pattern. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=902628047cb9763809ef2c3155cbf321e08c2656;p=gcc.git target-insns.def (indirect_jump): New targetm instruction pattern. 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d1aca5d38ec..90baee02446 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-07-28 Richard Sandiford + + * 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 * config/fr30/fr30.md (indirect_jump): Use pmode_register_operand diff --git a/gcc/optabs.c b/gcc/optabs.c index 0719ba2c558..c27e244beb0 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -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 } diff --git a/gcc/target-insns.def b/gcc/target-insns.def index 4f49ba6cf57..c125d6873eb 100644 --- a/gcc/target-insns.def +++ b/gcc/target-insns.def @@ -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))