diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9b7c0ccd44b..4a7fcb7c0d3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2008-02-29 Kaz Kojima + + * config/sh/sh.c (sh_secondary_reload): Handle loading a float + constant to fpul. + 2008-02-28 Richard Sandiford * simplify-rtx.c (simplify_unary_operation_1): Extend the handling diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index dccbc1ea350..fdee06182f3 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -10875,8 +10875,10 @@ sh_secondary_reload (bool in_p, rtx x, enum reg_class class, return GENERAL_REGS; if (class == FPUL_REGS && immediate_operand (x, mode)) { - if (satisfies_constraint_I08 (x)) + if (satisfies_constraint_I08 (x) || fp_zero_operand (x)) return GENERAL_REGS; + else if (mode == SFmode) + return FP_REGS; sri->icode = CODE_FOR_reload_insi__i_fpul; return NO_REGS; }