[PATCH] Add support for sparc GOTDATA optimizations in Gold.

David Miller davem@davemloft.net
Tue Apr 17 02:33:00 GMT 2012


From: Ian Lance Taylor <iant@google.com>
Date: Mon, 16 Apr 2012 17:15:35 -0700

> I think I would change the line setting reloc to
>     int32_t reloc = static_cast<int32_t>(value + addend);
> to make clear that you are intentionally dropping some bits for the
> 64-bit target.
> 
> The line
>     reloc ^= ~(Valtype)0;
> should probably be
>     reloc ^= ~static_cast<int32_t>(0);
> or perhaps even, for extreme clarity,
>     reloc = static_cast<int32_t>(static_cast<uint32_t>(reloc) 
>                                  ^ static_cast<uint32_t>(0));
> to avoid bit operations on signed types.
> 
> This is OK with changes along those lines.

Ok, I choose the medium level of clarity :-)

Thanks.



More information about the Binutils mailing list