From: Kaz Kojima Date: Wed, 1 Jul 2015 01:02:48 +0000 (+0000) Subject: re PR target/64833 ([SH]: Error: pcrel too far when compiling imagemagick and graphic... X-Git-Tag: upstream/12.2.0~53837 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5be6d9e45fe62addd10ca7950f594f8aeef3f07b;p=platform%2Fupstream%2Fgcc.git re PR target/64833 ([SH]: Error: pcrel too far when compiling imagemagick and graphicsmagick on Debian sh4) PR target/64833 * [SH] Set length of casesi_worker_1 insn to 8 when flag_pic is set. From-SVN: r225219 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fc23abd6c..65b3ffc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-06-30 Kaz Kojima + + PR target/64833 + * config/sh/sh.md (casesi_worker_1): Set length to 8 when + flag_pic is set. + 2015-06-30 Eric Botcazou * lto-streamer-out.c (class DFS): Adjust hash_scc method. diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md index 35113c0..5c8d306 100644 --- a/gcc/config/sh/sh.md +++ b/gcc/config/sh/sh.md @@ -11344,6 +11344,8 @@ label: LABEL_NUSES (operands[2])++; }) +;; This may be replaced with casesi_worker_2 in sh_reorg for PIC. +;; The insn length is set to 8 for that case. (define_insn "casesi_worker_1" [(set (match_operand:SI 0 "register_operand" "=r,r") (unspec:SI [(reg:SI R0_REG) @@ -11375,7 +11377,9 @@ label: gcc_unreachable (); } } - [(set_attr "length" "4")]) + [(set_attr_alternative "length" + [(if_then_else (match_test "flag_pic") (const_int 8) (const_int 4)) + (if_then_else (match_test "flag_pic") (const_int 8) (const_int 4))])]) (define_insn "casesi_worker_2" [(set (match_operand:SI 0 "register_operand" "=r,r")