aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ"orn Rennecke <joern.rennecke@st.com>2005-07-26 14:58:43 +0000
committerJoern Rennecke <amylaar@gcc.gnu.org>2005-07-26 15:58:43 +0100
commitdb48745242e25f3b9b414cd9e01986fe2205ccc1 (patch)
treeebac3b891d58e82daa28c21077485ff2f5c39bd2
parent84fd360ddcdabfe1209c0139aa937e9e0ee7547a (diff)
downloadgcc-db48745242e25f3b9b414cd9e01986fe2205ccc1.zip
gcc-db48745242e25f3b9b414cd9e01986fe2205ccc1.tar.gz
gcc-db48745242e25f3b9b414cd9e01986fe2205ccc1.tar.bz2
emit-rtl.c (gen_lowpart_common): Compare size of MODE in bits (rather than units) against HOST_BITS_PER_WIDE_INT.
* emit-rtl.c (gen_lowpart_common): Compare size of MODE in bits (rather than units) against HOST_BITS_PER_WIDE_INT. From-SVN: r102387
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/emit-rtl.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index feeaab3..c6b3bc2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2005-07-26 J"orn Rennecke <joern.rennecke@st.com>
+
+ * emit-rtl.c (gen_lowpart_common): Compare size of MODE in bits
+ (rather than units) against HOST_BITS_PER_WIDE_INT.
+
2005-07-26 Kazu Hirata <kazu@codesourcery.com>
* ipa-pure-const.c, ipa-reference.c, ipa-reference.h,
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index fc34f6e..ba3ae57 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -1118,7 +1118,8 @@ gen_lowpart_common (enum machine_mode mode, rtx x)
/* Unfortunately, this routine doesn't take a parameter for the mode of X,
so we have to make one up. Yuk. */
innermode = GET_MODE (x);
- if (GET_CODE (x) == CONST_INT && msize <= HOST_BITS_PER_WIDE_INT)
+ if (GET_CODE (x) == CONST_INT
+ && msize * BITS_PER_UNIT <= HOST_BITS_PER_WIDE_INT)
innermode = mode_for_size (HOST_BITS_PER_WIDE_INT, MODE_INT, 0);
else if (innermode == VOIDmode)
innermode = mode_for_size (HOST_BITS_PER_WIDE_INT * 2, MODE_INT, 0);