This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: wide-int branch now up for public comment and review
- From: Mike Stump <mikestump at comcast dot net>
- To: Richard Sandiford <rdsandiford at googlemail dot com>
- Cc: Kenneth Zadeck <zadeck at naturalbridge dot com>, rguenther at suse dot de, gcc-patches <gcc-patches at gcc dot gnu dot org>, r dot sandiford at uk dot ibm dot com
- Date: Sun, 25 Aug 2013 13:11:06 -0700
- Subject: Re: wide-int branch now up for public comment and review
- References: <520A9DCC dot 6080609 at naturalbridge dot com> <87ppt4e9hg dot fsf at talisman dot default> <B2FB5C39-EAA7-48FF-A063-FC496FF10E03 at comcast dot net> <87li3pd3p6 dot fsf at talisman dot default>
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:
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++)
{
which I fixed.