From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9619 invoked by alias); 25 Jan 2012 05:40:49 -0000 Received: (qmail 9339 invoked by uid 22791); 25 Jan 2012 05:40:47 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail-pz0-f41.google.com (HELO mail-pz0-f41.google.com) (209.85.210.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 25 Jan 2012 05:40:34 +0000 Received: by dang27 with SMTP id g27so3290463dan.0 for ; Tue, 24 Jan 2012 21:40:34 -0800 (PST) Received: by 10.68.189.69 with SMTP id gg5mr37451072pbc.41.1327470034383; Tue, 24 Jan 2012 21:40:34 -0800 (PST) Received: by 10.68.189.69 with SMTP id gg5mr37451043pbc.41.1327470034230; Tue, 24 Jan 2012 21:40:34 -0800 (PST) Received: from coign.google.com (adsl-71-133-8-30.dsl.pltn13.pacbell.net. [71.133.8.30]) by mx.google.com with ESMTPS id i1sm3612885pbt.19.2012.01.24.21.40.32 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 24 Jan 2012 21:40:33 -0800 (PST) From: Ian Lance Taylor To: Cary Coutant Cc: Binutils Subject: Re: [gold patch] Add inlined fast path for LEB128 routines References: Date: Wed, 25 Jan 2012 05:40:00 -0000 In-Reply-To: (Cary Coutant's message of "Tue, 24 Jan 2012 17:24:46 -0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2012-01/txt/msg00243.txt.bz2 Cary Coutant writes: > 2012-01-24 Cary Coutant > > * 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