[PATCH 2/3] Simplify and inline get_uleb128 and get_sleb128

Richard Henderson rth at redhat.com
Tue Apr 22 15:58:25 UTC 2014


On 04/22/2014 08:52 AM, Josh Stone wrote:
> The trick in the original was that "(typeof (var)) __s.i" would extend
> the sign from the 7th bit, which I don't your mask will do.

Yes, that was another cut/paste error.
Not a great batting average this morning...  ;-)

> So in total:
> 
>   struct { signed int i:7; } __s = { .i = __b };
>   (var) |= (typeof (var)) __s.i * ((typeof (var)) 1 << ((nth) * 7));
> 
> Better?

Yes, that's what I had in mind.


r~


More information about the elfutils-devel mailing list