From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26349 invoked by alias); 25 Jul 2009 00:44:44 -0000 Received: (qmail 26330 invoked by uid 22791); 25 Jul 2009 00:44:43 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 25 Jul 2009 00:44:37 +0000 Received: from zps37.corp.google.com (zps37.corp.google.com [172.25.146.37]) by smtp-out.google.com with ESMTP id n6P0iZPA028145 for ; Fri, 24 Jul 2009 17:44:35 -0700 Received: from gxk2 (gxk2.prod.google.com [10.202.11.2]) by zps37.corp.google.com with ESMTP id n6P0iWJ4032561 for ; Fri, 24 Jul 2009 17:44:32 -0700 Received: by gxk2 with SMTP id 2so1809600gxk.21 for ; Fri, 24 Jul 2009 17:44:32 -0700 (PDT) Received: by 10.90.35.6 with SMTP id i6mr3387047agi.92.1248482672251; Fri, 24 Jul 2009 17:44:32 -0700 (PDT) Received: from localhost.localdomain.google.com ([67.218.104.36]) by mx.google.com with ESMTPS id 38sm4437657agd.49.2009.07.24.17.44.29 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 24 Jul 2009 17:44:31 -0700 (PDT) To: "H.J. Lu" Cc: gcc-patches@gcc.gnu.org, gdb-patches@sourceware.org, dj@redhat.com Subject: Re: Add crc32 function to libiberty References: <6dc9ffc80907241723w18e945a5x6c665ec1780da6af@mail.gmail.com> From: Ian Lance Taylor Date: Sat, 25 Jul 2009 07:16:00 -0000 In-Reply-To: <6dc9ffc80907241723w18e945a5x6c665ec1780da6af@mail.gmail.com> (H. J. Lu's message of "Fri\, 24 Jul 2009 17\:23\:46 -0700") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true 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/msg00618.txt.bz2 "H.J. Lu" writes: > 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. =C2=A0This CRC function is a copy of the one in gd= b, >> except that the table of constants is precomputed. =C2=A0The gdb maintai= ners >> 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