This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH] Use 3 bits for type in bfd_link_hash_entry
- From: Alan Modra <amodra at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Wed, 13 Sep 2017 16:57:24 +0930
- Subject: Re: [PATCH] Use 3 bits for type in bfd_link_hash_entry
- Authentication-results: sourceware.org; auth=none
- References: <20170908154910.GA32008@gmail.com> <CAMe9rOpxS6MCHq=z+AaRRiHwQ2KkHCvXQX-KXxQo_2Vwp8VApA@mail.gmail.com>
On Tue, Sep 12, 2017 at 12:07 AM, H.J. Lu <email@example.com> wrote:
> On Fri, Sep 8, 2017 at 8:49 AM, H.J. Lu <firstname.lastname@example.org> wrote:
>> Since enum bfd_link_hash_type has 8 values, 3 bits are sufficient for
>> the type field in bfd_link_hash_entry.
>> OK for master?
>> * bfdlink.h (bfd_link_hash_entry): Use 3 bits, instead of 8
>> bits, for the type field.
I tried to send this a few days ago, but managed to screw up something
in my gmail account, so all the email I sent while at the Cauldron is
Have you had a look at code generated before and after this change?
I suspect it may be better to leave the field as 8 bits so that it can
be loaded as a byte on the many machines that have efficent byte
loads. At the moment we have quite a few unused bits in the word, so
not much is gained by reducing the field size.