Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LJ6bw-0004tw-Nd for qemu-devel@nongnu.org; Sat, 03 Jan 2009 08:32:16 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LJ6bv-0004tk-QD for qemu-devel@nongnu.org; Sat, 03 Jan 2009 08:32:16 -0500 Received: from [199.232.76.173] (port=58228 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LJ6bv-0004th-LU for qemu-devel@nongnu.org; Sat, 03 Jan 2009 08:32:15 -0500 Received: from hall.aurel32.net ([88.191.82.174]:49565) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LJ6bv-0007JB-74 for qemu-devel@nongnu.org; Sat, 03 Jan 2009 08:32:15 -0500 Date: Sat, 3 Jan 2009 14:32:13 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH 02/40] Add helper macros for later patches. Message-ID: <20090103133213.GE8871@hall.aurel32.net> References: <1230693022-18380-1-git-send-email-froydnj@codesourcery.com> <1230693022-18380-3-git-send-email-froydnj@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <1230693022-18380-3-git-send-email-froydnj@codesourcery.com> Sender: Aurelien Jarno Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Nathan Froyd Cc: qemu-devel@nongnu.org On Tue, Dec 30, 2008 at 07:09:44PM -0800, Nathan Froyd wrote: > Remove N_ELEMS, VECTOR_FOR, and VECTOR_FOR_I macros. Retain the > VECTOR_FOR_INORDER_I macros as the clearest way of expressing the intent > of iterating over elements in their stored target-endian order. > > Signed-off-by: Nathan Froyd Thanks, applied. > --- > target-ppc/op_helper.c | 22 ++++++++++++++++++++++ > 1 files changed, 22 insertions(+), 0 deletions(-) > > diff --git a/target-ppc/op_helper.c b/target-ppc/op_helper.c > index 876b517..5d603ba 100644 > --- a/target-ppc/op_helper.c > +++ b/target-ppc/op_helper.c > @@ -1954,6 +1954,28 @@ target_ulong helper_dlmzb (target_ulong high, target_ulong low, uint32_t update_ > } > > /*****************************************************************************/ > +/* Altivec extension helpers */ > +#if defined(WORDS_BIGENDIAN) > +#define HI_IDX 0 > +#define LO_IDX 1 > +#else > +#define HI_IDX 1 > +#define LO_IDX 0 > +#endif > + > +#if defined(WORDS_BIGENDIAN) > +#define VECTOR_FOR_INORDER_I(index, element) \ > + for (index = 0; index < ARRAY_SIZE(r->element); index++) > +#else > +#define VECTOR_FOR_INORDER_I(index, element) \ > + for (index = ARRAY_SIZE(r->element)-1; index >= 0; index--) > +#endif > + > +#undef VECTOR_FOR_INORDER_I > +#undef HI_IDX > +#undef LO_IDX > + > +/*****************************************************************************/ > /* SPE extension helpers */ > /* Use a table to make this quicker */ > static uint8_t hbrev[16] = { > -- > 1.6.0.5 > > > > -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net