From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5638 invoked by alias); 3 Jun 2014 14:50:43 -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 5567 invoked by uid 89); 3 Jun 2014 14:50:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 03 Jun 2014 14:50:41 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s53Eobck008476 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 3 Jun 2014 10:50:38 -0400 Received: from redacted.bos.redhat.com ([10.18.17.143]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s53EoZlT025497 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Tue, 3 Jun 2014 10:50:37 -0400 Date: Tue, 03 Jun 2014 14:50:00 -0000 From: Kyle McMartin To: Marcus Shawcroft Cc: "gdb-patches@sourceware.org" Subject: Re: [PATCH 1/2] aarch64: extend decode_adrp to decode immediate offset Message-ID: <20140603145035.GE15355@redacted.bos.redhat.com> References: <20140603050011.GA15355@redacted.bos.redhat.com> <20140603050153.GB15355@redacted.bos.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2014-06/txt/msg00086.txt.bz2 On Tue, Jun 03, 2014 at 09:22:28AM +0100, Marcus Shawcroft wrote: > Hi, > > On 3 June 2014 06:01, Kyle McMartin wrote: > > > @@ -264,16 +264,28 @@ decode_add_sub_imm (CORE_ADDR addr, uint32_t insn, unsigned *rd, unsigned *rn, > > Return 1 if the opcodes matches and is decoded, otherwise 0. */ > > > > static int > > -decode_adrp (CORE_ADDR addr, uint32_t insn, unsigned *rd) > > +decode_adrp (CORE_ADDR addr, uint32_t insn, int *page, unsigned *rd, > > + int64_t *imm) > > Given that this now decodes both adrp and adr the function name seems > inappropriate, how about following the convention used in the other > decode_ functions and changing to something like decode_adrp_adr ().. > ? > Sure, sounds good. > Returning both 'page' and 'imm' isn't necessary and I don't think it > makes sense given that logically both adr and adrp are used to > construct an address. Looking at this patch and the following patch I > think you can achieve the same functionality by having the decodes of > both adrp and adr return a value in 'imm'. In the case of an adrp > decode just returning: imm = page << 12 .... > Hmm, I was trying to avoid doing the actual computation inside it. I'm happy one way or another though. --Kyle > Cheers > /Marcus