On November 16, 2016 5:22:17 PM GMT+01:00, Marc Glisse
wrote:
>On Wed, 16 Nov 2016, Michael Matz wrote:
>
>> Hi,
>>
>> On Wed, 16 Nov 2016, Marc Glisse wrote:
>>
> The first sentence about ORing the sign bit sounds strange (except
>for a
> sign-magnitude
On Wed, 16 Nov 2016, Michael Matz wrote:
Hi,
On Wed, 16 Nov 2016, Marc Glisse wrote:
The first sentence about ORing the sign bit sounds strange (except for a
sign-magnitude representation). With 2's complement, INT_MIN is -2^31, the
divisors are the 2^k and -(2^k). -2 * 2^30 yields INT_MIN,
Hi,
On Wed, 16 Nov 2016, Michael Matz wrote:
> > Looks good to me, thanks.
>
> An integer X is a power of two if and only if
> X & -X == 0 (&& X != 0 if you want to exclude zero)
Nonsense. It's X & -X == X (or X & (X-1) == 0) of course, and doesn't
handle negative numbers. Still, no
Hi,
On Wed, 16 Nov 2016, Marc Glisse wrote:
> > > The first sentence about ORing the sign bit sounds strange (except for a
> > > sign-magnitude representation). With 2's complement, INT_MIN is -2^31, the
> > > divisors are the 2^k and -(2^k). -2 * 2^30 yields INT_MIN, but your test
> > > misses
On Wed, 16 Nov 2016, Richard Biener wrote:
On Wed, 16 Nov 2016, Marc Glisse wrote:
On Wed, 16 Nov 2016, Richard Biener wrote:
On Wed, 16 Nov 2016, Marc Glisse wrote:
On Wed, 16 Nov 2016, Richard Biener wrote:
I am testing the following to avoid undefined behavior when negating
a
On Wed, 16 Nov 2016, Marc Glisse wrote:
> On Wed, 16 Nov 2016, Richard Biener wrote:
>
> > On Wed, 16 Nov 2016, Marc Glisse wrote:
> >
> > > On Wed, 16 Nov 2016, Richard Biener wrote:
> > >
> > > > I am testing the following to avoid undefined behavior when negating
> > > > a multiplication
On Wed, 16 Nov 2016, Richard Biener wrote:
On Wed, 16 Nov 2016, Marc Glisse wrote:
On Wed, 16 Nov 2016, Richard Biener wrote:
I am testing the following to avoid undefined behavior when negating
a multiplication (basically extending a previous fix to properly handle
negative power of two).
On Wed, 16 Nov 2016, Marc Glisse wrote:
> On Wed, 16 Nov 2016, Richard Biener wrote:
>
> > I am testing the following to avoid undefined behavior when negating
> > a multiplication (basically extending a previous fix to properly handle
> > negative power of two).
> >
> > Bootstrap / regtest
On Wed, 16 Nov 2016, Richard Biener wrote:
I am testing the following to avoid undefined behavior when negating
a multiplication (basically extending a previous fix to properly handle
negative power of two).
Bootstrap / regtest running on x86_64-unknown-linux-gnu.
Richard.
2016-11-16
I am testing the following to avoid undefined behavior when negating
a multiplication (basically extending a previous fix to properly handle
negative power of two).
Bootstrap / regtest running on x86_64-unknown-linux-gnu.
Richard.
2016-11-16 Richard Biener
PR
10 matches
Mail list logo