2012-04-06 Oleg Endo <olegendo@gcc.gnu.org>
+ * 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 <olegendo@gcc.gnu.org>
+
* config/sh/sh-protos.h (fp_zero_operand, fp_one_operand,
nonpic_symbol_mentioned_p, expand_block_move, expand_ashiftrt,
sh_dynamicalize_shift_p, gen_shl_and, gen_shl_sext, system_reg_operand,
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 */
return val;
}
-int
+bool
sh_expand_t_scc (rtx operands[])
{
enum rtx_code code = GET_CODE (operands[1]);
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. */
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)
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)