linux-mips
[Top] [All Lists]

Re: [RFC] Optimize swab operations on mips_r2 cpu

To: Ralf Baechle <ralf@linux-mips.org>
Subject: Re: [RFC] Optimize swab operations on mips_r2 cpu
From: Franck <vagabon.xyz@gmail.com>
Date: Wed, 25 Jan 2006 14:34:52 +0100
Cc: linux-mips@linux-mips.org
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=oVQ0PClnHqAtu39j4G33DhMe2kJi0nyRRX9JRMZwrm5MrXtSZMAeGgGKQZczEPC5RooXDPIoGlnBMi+U0o/GEUpcgyqjXQK4yC48tzLvQvUu5hHTspouRYoEPAwGljFFAhwwgrS8kzgIavtZrf8+BNyg9FoeODIiYxA1EkB+/lY=
In-reply-to: <20060125124738.GA3454@linux-mips.org>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <cda58cb80601250136p5ee350e6g@mail.gmail.com> <20060125124738.GA3454@linux-mips.org>
Sender: linux-mips-bounce@linux-mips.org
Hi Ralf

2006/1/25, Ralf Baechle <ralf@linux-mips.org>:
> On Wed, Jan 25, 2006 at 10:36:46AM +0100, Franck wrote:
>
> > Here is a little patch to optimize swab operations by using "wsbh"
> > instruction available on mips revision 2 cpus. I do not know what
> > condition I should use to compile this only for mips r2 cpu though.
> >
> > Comments ?
>
> Looks good aside of the one issue you've already raised yourself:
>
> > +/* FIXME: MIPS_R2 only */
>

I was actually asking for advices :)

I can see only two simple ways to do that:
(a) we can define a couple of new macro ie CONFIG_MIPS32_ISET_R[12]
that can be set depending on the selected CPU;
(b) define a new macro CONFIG_CPU_HAS_WSBH;

What do you think ?

Thanks
--
               Franck

<Prev in Thread] Current Thread [Next in Thread>