rtlhooks.c (gen_lowpart_general): Handle SUBREGs of floating point values.
authorJ"orn Rennecke <joern.rennecke@st.com>
Tue, 13 Dec 2005 12:49:56 +0000 (12:49 +0000)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Tue, 13 Dec 2005 12:49:56 +0000 (12:49 +0000)
* rtlhooks.c (gen_lowpart_general): Handle SUBREGs of floating point
values.

From-SVN: r108479

gcc/ChangeLog
gcc/rtlhooks.c

index 0a6bd70888f5938ef7434e8f8f6dd67433f59b84..345f7d6bec75c4ec4e985c37f43948b0213e06b7 100644 (file)
@@ -1,3 +1,8 @@
+2005-12-13  J"orn Rennecke <joern.rennecke@st.com>
+
+       * rtlhooks.c (gen_lowpart_general): Handle SUBREGs of floating point
+       values.
+
 2005-12-13  Nathan Sidwell  <nathan@codesourcery.com>
 
        * config/mt/t-mt (MULTILIB_OPTIONS): Add ms2
index bc413987865f27a15d5eb1c36fd787da059900ae..0034da783fac85b882f5919e6d169be71cbebcaf 100644 (file)
@@ -44,9 +44,12 @@ gen_lowpart_general (enum machine_mode mode, rtx x)
 
   if (result)
     return result;
-  else if (REG_P (x))
+  /* If it's a REG, it must be a hard reg that's not valid in MODE.  */
+  else if (REG_P (x)
+          /* Or we could have a subreg of a floating point value.  */
+          || (GET_CODE (x) == SUBREG
+              && FLOAT_MODE_P (GET_MODE (SUBREG_REG (x)))))
     {
-      /* Must be a hard reg that's not valid in MODE.  */
       result = gen_lowpart_common (mode, copy_to_reg (x));
       gcc_assert (result != 0);
       return result;