This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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: Add crc32 function to libiberty


"H.J. Lu" <hjl.tools@gmail.com> writes:

> On Fri, Jul 24, 2009 at 3:49 PM, Ian Lance Taylor<iant@google.com> wrote:
>> Some upcoming work in gold (by Sriraman Tallam) requires a CRC function.
>> I could add a CRC function to gold, but I think it makes sense to add it
>> to libiberty instead. ÂThis CRC function is a copy of the one in gdb,
>> except that the table of constants is precomputed. ÂThe gdb maintainers
>> may want to consider switching to this version--I don't think 1K of
>> read-only data space is all that much these days.
>
> Is that possible to use a compatible polynomia so that hardware
> crc32 in SSE4.2 can be used if available?

As the comments in the file explain, the algorithm is intended to
compute the precise CRC that gdb computes.  That CRC could be hard to
change, as it is used in the remote protocol between gdb and stubs
running on remote targets.

I have no objection to having libiberty also provide an SSE 4.2
compatible polynomial if anybody wants to work on that.

Ian


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