Patchwork wide-int branch now up for public comment and review

login
register
mail settings
Submitter Mike Stump
Date Aug. 25, 2013, 8:11 p.m.
Message ID <28EEF185-4824-402C-BA76-48E0AE469ABE@comcast.net>
Download mbox | patch
Permalink /patch/269721/
State New
Headers show

Comments

Mike Stump - Aug. 25, 2013, 8:11 p.m.
On Aug 25, 2013, at 11:29 AM, Richard Sandiford <rdsandiford@googlemail.com> wrote:
> Looks like wide-int is just using BITS_PER_UNIT to get the number of
> bits in "char".  That's a host thing, so it should be CHAR_BIT instead.

Oh, Kenny did point out one sin:


which I fixed.

Patch

diff --git a/gcc/wide-int.cc b/gcc/wide-int.cc
index 37ce5b3..891c227 100644
--- a/gcc/wide-int.cc
+++ b/gcc/wide-int.cc
@@ -2056,7 +2056,7 @@  wide_int_ro::mul_internal (bool high, bool full,
 
   /* The 2 is for a full mult.  */
   memset (r, 0, half_blocks_needed * 2
-         * HOST_BITS_PER_HALF_WIDE_INT / BITS_PER_UNIT);
+         * HOST_BITS_PER_HALF_WIDE_INT / CHAR_BIT);
 
   for (j = 0; j < half_blocks_needed; j++)
     {