This is the mail archive of the
mailing list for the binutils project.
Re: [PATCH] Add support for sparc GOTDATA optimizations in Gold.
From: Ian Lance Taylor <firstname.lastname@example.org>
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 :-)