This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: dwarf2 long long patch
- To: Richard Henderson <rth at redhat dot com>
- Subject: Re: dwarf2 long long patch
- From: Nathan Sidwell <nathan at codesourcery dot com>
- Date: Wed, 04 Jul 2001 21:13:50 +0100
- CC: gcc-patches at gcc dot gnu dot org, jason at redhat dot com
- Organization: Codesourcery LLC
- References: <3B437195.125340F4@codesourcery.com> <20010704125225.A29879@redhat.com>
Richard Henderson wrote:
>
> On Wed, Jul 04, 2001 at 08:42:13PM +0100, Nathan Sidwell wrote:
> ! ((((unsigned HOST_WIDE_INT) 1)
> ! << (DWARF2_ADDR_SIZE * 8 - 1)) << 1) - 1,
>
> This is equivalent to (unsigned HOST_WIDE_INT) -1. Otherwise ok.
Looking at the definition of DWARF2_ADDR_SIZE, that 8 should be
BITS_PER_UNIT.
I don't think your invariant holds. HOST_WIDE_INT could be 64 bits and
POINTER_SIZE (which is where DWARF2_ADDR_SIZE comes from, by default),
could be 32, for instance.
As you'll realise, there are two shifts to
avoid the ill-defined case of shifting a HOST_WIDE_INT by the number
of bits in a host wide int -- I should stick a comment in about that.
ok with that change from 8 -> BITS_PER_UNIT + comment?
nathan
--
Dr Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org