From: Oleg Endo Date: Fri, 6 Apr 2012 12:29:30 +0000 (+0000) Subject: sh-protos.h (sh_expand_t_scc): Change return type from int to bool. X-Git-Tag: misc/gccgo-go1_1_2~3629 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=10c17a58ae6ae5dbcd83f1ecc92db7d5001811cb;p=thirdparty%2Fgcc.git sh-protos.h (sh_expand_t_scc): Change return type from int to bool. * config/sh/sh-protos.h (sh_expand_t_scc): Change return type from int to bool. * config/sh/sh.c (sh_expand_t_scc): Likewise. * config/sh/sh.md (cstoresi4, cstoredi4): Remove GET_CODE checks before calling sh_expand_t_scc. From-SVN: r186184 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 78faf4674338..ea39b2fa3860 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2012-04-06 Oleg Endo + + * config/sh/sh-protos.h (sh_expand_t_scc): Change return type from int + to bool. + * config/sh/sh.c (sh_expand_t_scc): Likewise. + * config/sh/sh.md (cstoresi4, cstoredi4): Remove GET_CODE checks before + calling sh_expand_t_scc. + 2012-04-06 Oleg Endo * config/sh/sh-protos.h (fp_zero_operand, fp_one_operand, diff --git a/gcc/config/sh/sh-protos.h b/gcc/config/sh/sh-protos.h index 337d80d82ce3..97442c433278 100644 --- a/gcc/config/sh/sh-protos.h +++ b/gcc/config/sh/sh-protos.h @@ -117,7 +117,7 @@ extern int sh_insn_length_adjustment (rtx); extern bool sh_can_redirect_branch (rtx, rtx); extern void sh_expand_unop_v2sf (enum rtx_code, rtx, rtx); extern void sh_expand_binop_v2sf (enum rtx_code, rtx, rtx, rtx); -extern int sh_expand_t_scc (rtx *); +extern bool sh_expand_t_scc (rtx *); extern rtx sh_gen_truncate (enum machine_mode, rtx, int); extern bool sh_vector_mode_supported_p (enum machine_mode); #endif /* RTX_CODE */ diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index d7c4c61699c1..0a6f71d260a2 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -11998,7 +11998,7 @@ sh_get_pr_initial_val (void) return val; } -int +bool sh_expand_t_scc (rtx operands[]) { enum rtx_code code = GET_CODE (operands[1]); @@ -12010,21 +12010,21 @@ sh_expand_t_scc (rtx operands[]) if (!REG_P (op0) || REGNO (op0) != T_REG || !CONST_INT_P (op1)) - return 0; + return false; if (!REG_P (result)) result = gen_reg_rtx (SImode); val = INTVAL (op1); if ((code == EQ && val == 1) || (code == NE && val == 0)) emit_insn (gen_movt (result)); else if ((code == EQ && val == 0) || (code == NE && val == 1)) - emit_insn (gen_movnegt (result)); + emit_insn (gen_movnegt (result)); else if (code == EQ || code == NE) emit_insn (gen_move_insn (result, GEN_INT (code == NE))); else - return 0; + return false; if (result != target) emit_move_insn (target, result); - return 1; + return true; } /* INSN is an sfunc; return the rtx that describes the address used. */ diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md index f5bcae219c30..dd7ff668e4aa 100644 --- a/gcc/config/sh/sh.md +++ b/gcc/config/sh/sh.md @@ -9575,8 +9575,7 @@ label: DONE; } - if ((GET_CODE (operands[1]) == EQ || GET_CODE (operands[1]) == NE) - && sh_expand_t_scc (operands)) + if (sh_expand_t_scc (operands)) DONE; if (! currently_expanding_to_rtl) @@ -9600,8 +9599,7 @@ label: DONE; } - if ((GET_CODE (operands[1]) == EQ || GET_CODE (operands[1]) == NE) - && sh_expand_t_scc (operands)) + if (sh_expand_t_scc (operands)) DONE; if (! currently_expanding_to_rtl)