diff options
author | Jeff Law <law@redhat.com> | 2008-09-04 19:29:59 -0600 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2008-09-04 19:29:59 -0600 |
commit | 54193313580e8f4ced394e41cd8aa8f43597b09e (patch) | |
tree | a404b0227f317de517ee1c9c2dada303eb45c854 /gcc/fold-const.c | |
parent | 7fab7e160355fc0ad5ee59f03c35489178d44854 (diff) | |
download | gcc-54193313580e8f4ced394e41cd8aa8f43597b09e.zip gcc-54193313580e8f4ced394e41cd8aa8f43597b09e.tar.gz gcc-54193313580e8f4ced394e41cd8aa8f43597b09e.tar.bz2 |
fold-const.c (native_encode_real): Fix computation of WORDS.
* fold-const.c (native_encode_real): Fix computation of WORDS.
(native_interpret_real): Likewise.
From-SVN: r140023
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 561fb80..7c4c522 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -7225,7 +7225,7 @@ native_encode_real (const_tree expr, unsigned char *ptr, int len) if (total_bytes > len) return 0; - words = 32 / UNITS_PER_WORD; + words = (32 / BITS_PER_UNIT) / UNITS_PER_WORD; real_to_target (tmp, TREE_REAL_CST_PTR (expr), TYPE_MODE (type)); @@ -7415,7 +7415,7 @@ native_interpret_real (tree type, const unsigned char *ptr, int len) total_bytes = GET_MODE_SIZE (TYPE_MODE (type)); if (total_bytes > len || total_bytes > 24) return NULL_TREE; - words = 32 / UNITS_PER_WORD; + words = (32 / BITS_PER_UNIT) / UNITS_PER_WORD; memset (tmp, 0, sizeof (tmp)); for (bitpos = 0; bitpos < total_bytes * BITS_PER_UNIT; |