From c0311627d1d0be05baf31e0022936691acd6d094 Mon Sep 17 00:00:00 2001 From: "J\"orn Rennecke" Date: Wed, 1 Sep 2004 13:43:40 +0000 Subject: [PATCH] config/sh/sh.md ("length"): Increase branch length when SH1 pic code to 18: 12 bytes of instructions, 4 byte for the constant, 2 byte for aligning the constant. Co-Authored-By: Nick Clifton From-SVN: r86886 --- gcc/ChangeLog | 7 +++++++ gcc/config/sh/sh.md | 15 +++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6846701f1c3..606a2147548 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2004-09-01 J"orn Rennecke + Nick Clifton + + * config/sh/sh.md ("length"): Increase branch length when + SH1 pic code to 18: 12 bytes of instructions, 4 byte for the + constant, 2 byte for aligning the constant. + 2004-09-01 Richard Earnshaw * arm/arm-cores.def (ARM_CORE): Add new field for the real name of the diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md index a21a2a4b869..31e05a2fead 100644 --- a/gcc/config/sh/sh.md +++ b/gcc/config/sh/sh.md @@ -404,12 +404,15 @@ (cond [(eq_attr "med_branch_p" "yes") (const_int 2) (and (eq (symbol_ref "GET_CODE (prev_nonnote_insn (insn))") - (symbol_ref "INSN")) - (eq (symbol_ref "INSN_CODE (prev_nonnote_insn (insn))") - (symbol_ref "code_for_indirect_jump_scratch"))) - (if_then_else (eq_attr "braf_branch_p" "yes") - (const_int 6) - (const_int 10)) + (symbol_ref "INSN")) + (eq (symbol_ref "INSN_CODE (prev_nonnote_insn (insn))") + (symbol_ref "code_for_indirect_jump_scratch"))) + (cond [(eq_attr "braf_branch_p" "yes") + (const_int 6) + (eq (symbol_ref "flag_pic") (const_int 0)) + (const_int 10) + (ne (symbol_ref "TARGET_SH2") (const_int 0)) + (const_int 10)] (const_int 18)) (eq_attr "braf_branch_p" "yes") (const_int 10) ;; ??? using pc is not computed transitively. -- 2.30.2