Commit 4978c736 by Kaz Kojima

re PR rtl-optimization/48596 ([SH] unable to find a register to spill in class 'FPUL_REGS')

	PR target/48596
	PR target/48806
	* config/sh/sh.c (sh_register_move_cost): Increase cost between
	GENERAL_REGS and FP_REGS for SImode.

From-SVN: r184844
parent b98fcf6e
2012-03-02 Kaz Kojima <kkojima@gcc.gnu.org>
PR target/48596
PR target/48806
* config/sh/sh.c (sh_register_move_cost): Increase cost between
GENERAL_REGS and FP_REGS for SImode.
2012-03-02 Oleg Endo <olegendo@gcc.gnu.org>
PR target/49486
......
......@@ -11517,8 +11517,15 @@ sh_register_move_cost (enum machine_mode mode,
&& REGCLASS_HAS_GENERAL_REG (srcclass))
|| (REGCLASS_HAS_GENERAL_REG (dstclass)
&& REGCLASS_HAS_FP_REG (srcclass)))
return ((TARGET_SHMEDIA ? 4 : TARGET_FMOVD ? 8 : 12)
* ((GET_MODE_SIZE (mode) + 7) / 8U));
{
/* Discourage trying to use fp regs for a pointer. This also
discourages fp regs with SImode because Pmode is an alias
of SImode on this target. See PR target/48596. */
int addend = (mode == Pmode) ? 40 : 0;
return (((TARGET_SHMEDIA ? 4 : TARGET_FMOVD ? 8 : 12) + addend)
* ((GET_MODE_SIZE (mode) + 7) / 8U));
}
if ((dstclass == FPUL_REGS
&& REGCLASS_HAS_GENERAL_REG (srcclass))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment