[PATCH] Use 3 bits for type in bfd_link_hash_entry

Alan Modra amodra@gmail.com
Wed Sep 13 07:27:00 GMT 2017


On Tue, Sep 12, 2017 at 12:07 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Fri, Sep 8, 2017 at 8:49 AM, H.J. Lu <hongjiu.lu@intel.com> 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?
>>
>> H.J.
>> ---
>>         * 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
lost..

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.



More information about the Binutils mailing list