From de4e153694cdb735218e205f032d5da4d2c01086 Mon Sep 17 00:00:00 2001 From: rsandifo Date: Tue, 28 Jul 2015 19:50:22 +0000 Subject: [PATCH] gcc/ * target-insns.def (indirect_jump): New targetm instruction pattern. * optabs.c (emit_indirect_jump): Use it instead of HAVE_*/gen_* interface. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@226321 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/optabs.c | 11 +++++------ gcc/target-insns.def | 1 + 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d1aca5d38ec..90baee02446 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 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 instead of nonimmediate_operand. Remove C condiition. 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)) -- 2.11.4.GIT