OSDN Git Service

* fold-const.c (native_encode_real): Fix computation of WORDS.
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 5 Sep 2008 01:29:59 +0000 (01:29 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 5 Sep 2008 01:29:59 +0000 (01:29 +0000)
(native_interpret_real): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140023 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/fold-const.c

index bd7d350..ecb3bdc 100644 (file)
@@ -1,3 +1,8 @@
+2008-09-04  Jeff Law  <law@redhat.com>
+
+       * fold-const.c (native_encode_real): Fix computation of WORDS.
+       (native_interpret_real): Likewise.
+
 2008-09-04  Janis Johnson  <janis187@us.ibm.com>
 
        * config/rs6000/t-rs6000: Remove target gt-rs6000.h.
index 561fb80..7c4c522 100644 (file)
@@ -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;