This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [gold patch] Add inlined fast path for LEB128 routines
Cary Coutant <ccoutant@google.com> writes:
> 2012-01-24 Cary Coutant <ccoutant@google.com>
>
> * int_encoding.cc (read_unsigned_LEB_128): Replaced with inline
> definition and ...
> (read_unsigned_LEB_128_x): ... this new function.
> (read_signed_LEB_128): Replaced with inline definition and ...
> (read_signed_LEB_128_x): ... this new function.
> * int_encoding.h (read_unsigned_LEB_128_x): New function.
> (read_unsigned_LEB_128): Add inline definition.
> (read_signed_LEB_128_x): New function.
> (read_signed_LEB_128): Add inline definition.
> * testsuite/Makefile.am (leb128_unittest): New unit test.
> * testsuite/Makefile.in: Regenerate.
> * testsuite/leb128_unittest.cc: New unit test.
> + if (byte & 0x80)
> + return read_unsigned_LEB_128_x(buffer, plen, byte);
Write ((byte & 0x80) != 0)
> + if (byte & 0x80)
> + return read_signed_LEB_128_x(buffer, plen, byte);
Here too.
This is OK with those changes.
Thanks.
Ian