From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7556 invoked by alias); 17 Dec 2013 17:30:26 -0000 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 Received: (qmail 7514 invoked by uid 89); 17 Dec 2013 17:30:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mail-gw2-out.broadcom.com Received: from mail-gw2-out.broadcom.com (HELO mail-gw2-out.broadcom.com) (216.31.210.63) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 17 Dec 2013 17:30:24 +0000 Received: from irvexchcas08.broadcom.com (HELO IRVEXCHCAS08.corp.ad.broadcom.com) ([10.9.208.57]) by mail-gw2-out.broadcom.com with ESMTP; 17 Dec 2013 09:36:31 -0800 Received: from IRVEXCHSMTP3.corp.ad.broadcom.com (10.9.207.53) by IRVEXCHCAS08.corp.ad.broadcom.com (10.9.208.57) with Microsoft SMTP Server (TLS) id 14.1.438.0; Tue, 17 Dec 2013 09:30:22 -0800 Received: from mail-irva-13.broadcom.com (10.10.10.20) by IRVEXCHSMTP3.corp.ad.broadcom.com (10.9.207.53) with Microsoft SMTP Server id 14.1.438.0; Tue, 17 Dec 2013 09:30:22 -0800 Received: from [10.177.73.57] (unknown [10.177.73.57]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id CD36A246AF; Tue, 17 Dec 2013 09:29:42 -0800 (PST) Message-ID: <52B08A05.6000306@broadcom.com> Date: Tue, 17 Dec 2013 17:30:00 -0000 From: Andrew Burgess User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Pedro Alves CC: Subject: Re: [PATCH [2/2] Convert the unavailable vector to be bit, not byte, based. References: <529F489F.7070805@broadcom.com> <529F498F.7060909@broadcom.com> <52A8929E.20608@broadcom.com> <52A8B2B3.2060901@redhat.com> In-Reply-To: <52A8B2B3.2060901@redhat.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2013-12/txt/msg00657.txt.bz2 On 11/12/2013 6:45 PM, Pedro Alves wrote: > On 12/11/2013 04:28 PM, Andrew Burgess wrote: >> + >> + It is assumed that memory can be accessed from: >> + PTR + (OFFSET_BITS / TARGET_CHAR_BIT) >> + to: >> + PTR + ((OFFSET_BITS + TARGET_CHAR_BIT - 1)/ TARGET_CHAR_BIT) */ > > The "to:" part doesn't look right -- LENGTH_BITS seems to be > missing somewhere? Also, missing space before second "/". Fixed as: + It is assumed that memory can be accessed from: + PTR + (OFFSET_BITS / TARGET_CHAR_BIT) + to: + PTR + ((OFFSET_BITS + LENGTH_BITS + TARGET_CHAR_BIT - 1) + / TARGET_CHAR_BIT) */ > >> + bits = TARGET_CHAR_BIT - (offset1_bits % TARGET_CHAR_BIT); > > Unnecessary parens. Tightened up on this throughout. > >> + b1 = *((bfd_byte *) ((uintptr_t) ptr1 + (o1 / TARGET_CHAR_BIT))); >> + b2 = *((bfd_byte *) ((uintptr_t) ptr2 + (o2 / TARGET_CHAR_BIT))); > > No need for uintptr_t, nor the rightmost set of parens: Fixed. > > Otherwise looks OK. Thanks a lot for doing this! I've pushed a version with those minor fixes. Thanks for all your reviews. Andrew