From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15577 invoked by alias); 25 Jul 2009 00:23:56 -0000 Received: (qmail 15561 invoked by uid 22791); 25 Jul 2009 00:23:55 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-ew0-f217.google.com (HELO mail-ew0-f217.google.com) (209.85.219.217) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 25 Jul 2009 00:23:49 +0000 Received: by ewy17 with SMTP id 17so2012563ewy.24 for ; Fri, 24 Jul 2009 17:23:46 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.26.200 with SMTP id c50mr1137810wea.61.1248481426427; Fri, 24 Jul 2009 17:23:46 -0700 (PDT) In-Reply-To: References: Date: Sat, 25 Jul 2009 00:44:00 -0000 Message-ID: <6dc9ffc80907241723w18e945a5x6c665ec1780da6af@mail.gmail.com> Subject: Re: Add crc32 function to libiberty From: "H.J. Lu" To: Ian Lance Taylor Cc: gcc-patches@gcc.gnu.org, gdb-patches@sourceware.org, dj@redhat.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-07/txt/msg00616.txt.bz2 On Fri, Jul 24, 2009 at 3:49 PM, Ian Lance Taylor 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. =A0This CRC function is a copy of the one in gdb, > except that the table of constants is precomputed. =A0The 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. > > I am running a bootstrap on x86_64-unknown-linux-gnu and plan to commit > this shortly. > > Ian > > > include/ChangeLog: > > 2009-07-24 =A0Ian Lance Taylor =A0 > > =A0 =A0 =A0 =A0* libiberty.h (crc32): Declare. > > libiberty/ChangeLog: > > 2009-07-24 =A0Ian Lance Taylor =A0 > > =A0 =A0 =A0 =A0* crc32.c: New file. > =A0 =A0 =A0 =A0* Makefile.in: Rebuild dependencies. > =A0 =A0 =A0 =A0(CFILES): Add crc32.c. > =A0 =A0 =A0 =A0(REQUIRED_OFILES): Add ./crc32.o. > =A0 =A0 =A0 =A0* functions.texi: Rebuild. Is that possible to use a compatible polynomia so that hardware crc32 in SSE4.2 can be used if available? Thanks. --=20 H.J.