This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]