sh.c (sh_secondary_reload): Handle loading a float constant to fpul.
authorKaz Kojima <kkojima@gcc.gnu.org>
Fri, 29 Feb 2008 12:37:34 +0000 (12:37 +0000)
committerKaz Kojima <kkojima@gcc.gnu.org>
Fri, 29 Feb 2008 12:37:34 +0000 (12:37 +0000)
* config/sh/sh.c (sh_secondary_reload): Handle loading a float
constant to fpul.

From-SVN: r132764

gcc/ChangeLog
gcc/config/sh/sh.c

index 9b7c0ccd44b87392e48d499254ded22fb67389b7..4a7fcb7c0d3627c30fba09436cc13718e53b506b 100644 (file)
@@ -1,3 +1,8 @@
+2008-02-29  Kaz Kojima  <kkojima@gcc.gnu.org>
+
+       * config/sh/sh.c (sh_secondary_reload): Handle loading a float
+       constant to fpul.
+
 2008-02-28  Richard Sandiford  <rsandifo@nildram.co.uk>
 
        * simplify-rtx.c (simplify_unary_operation_1): Extend the handling
index dccbc1ea3509e816ff20234fe9d67d76e439c1ad..fdee06182f338e74e11717f26e737a81381645b9 100644 (file)
@@ -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;
        }