From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20454 invoked by alias); 30 Jan 2008 18:14:27 -0000 Received: (qmail 20445 invoked by uid 22791); 30 Jan 2008 18:14:26 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 30 Jan 2008 18:14:07 +0000 Received: from brahms.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by brahms.sibelius.xs4all.nl (8.14.1/8.14.1) with ESMTP id m0UIE18E022793; Wed, 30 Jan 2008 19:14:01 +0100 (CET) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.14.1/8.14.1/Submit) id m0UIE006010057; Wed, 30 Jan 2008 19:14:00 +0100 (CET) Date: Wed, 30 Jan 2008 18:21:00 -0000 Message-Id: <200801301814.m0UIE006010057@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: bauerman@br.ibm.com CC: gdb-patches@sourceware.org In-reply-to: <1201705759.11950.228.camel@localhost.localdomain> (message from Thiago Jung Bauermann on Wed, 30 Jan 2008 13:09:19 -0200) Subject: Re: [RFA] Put SPE verification in macro. References: <1201705759.11950.228.camel@localhost.localdomain> 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: 2008-01/txt/msg00810.txt.bz2 > From: Thiago Jung Bauermann > Date: Wed, 30 Jan 2008 13:09:19 -0200 > > Hi, > > This patch is a small cleanup which makes my revised version of the DFP > pseudo-registers patch more readable. I put the mantra used to check if > a given register number is an SPE pseudo-register in a macro and used it > whenever possible. > > The only case the macro isnt't a direct replacement was this: > > @@ -179,9 +184,7 @@ spe_register_p (struct gdbarch *gdbarch, > struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); > > /* Is it a reference to EV0 -- EV31, and do we have those? */ > - if (tdep->ppc_ev0_regnum >= 0 > - && tdep->ppc_ev31_regnum >= 0 > - && tdep->ppc_ev0_regnum <= regno && regno <= > tdep->ppc_ev31_regnum) > + if (IS_SPE_PSEUDOREG (tdep, regno)) > return 1; > > The above code checks if ppc_ev31_regnum is >= 0 and if regno <= > ppc_ev31_regnum. Since ppc_ev31_regnum is set in the same place and > condition that ppc_ev0_regnum is set, and that ppc_ev31_regnum's value > is ppc_ev0_regnum + 31, those checks are equivalent to the ones made by > the new macro. This makes ppc_ev31_regnum completely redundant isn't it? Could you remove it?