aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJ"orn Rennecke <joern.rennecke@st.com>2005-12-13 12:49:56 +0000
committerJoern Rennecke <amylaar@gcc.gnu.org>2005-12-13 12:49:56 +0000
commit80e6edb051397f18aa328e0ddeb83f4bf380b3f9 (patch)
tree352708c243910ab5689818261dd1bb249311d023 /gcc
parentce9d566844297f5d36887a0a19913fea8927e664 (diff)
downloadgcc-80e6edb051397f18aa328e0ddeb83f4bf380b3f9.zip
gcc-80e6edb051397f18aa328e0ddeb83f4bf380b3f9.tar.gz
gcc-80e6edb051397f18aa328e0ddeb83f4bf380b3f9.tar.bz2
rtlhooks.c (gen_lowpart_general): Handle SUBREGs of floating point values.
* rtlhooks.c (gen_lowpart_general): Handle SUBREGs of floating point values. From-SVN: r108479
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/rtlhooks.c7
2 files changed, 10 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0a6bd70..345f7d6 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/rtlhooks.c b/gcc/rtlhooks.c
index bc41398..0034da7 100644
--- a/gcc/rtlhooks.c
+++ b/gcc/rtlhooks.c
@@ -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;