linux-mips
[Top] [All Lists]

Re: [PATCH] TX49 MFC0 bug workaround

To: "Maciej W. Rozycki" <macro@linux-mips.org>
Subject: Re: [PATCH] TX49 MFC0 bug workaround
From: Ralf Baechle <ralf@linux-mips.org>
Date: Thu, 2 Feb 2006 16:56:56 +0000
Cc: Atsushi Nemoto <anemo@mba.ocn.ne.jp>, linux-mips@linux-mips.org
In-reply-to: <Pine.LNX.4.64N.0602021636380.11727@blysk.ds.pg.gda.pl>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20060203.013401.41198517.anemo@mba.ocn.ne.jp> <Pine.LNX.4.64N.0602021636380.11727@blysk.ds.pg.gda.pl>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.4.2.1i
On Thu, Feb 02, 2006 at 04:38:37PM +0000, Maciej W. Rozycki wrote:
> Date: Thu, 2 Feb 2006 16:38:37 +0000 (GMT)
> From: "Maciej W. Rozycki" <macro@linux-mips.org>
> To:   Atsushi Nemoto <anemo@mba.ocn.ne.jp>
> Cc:   linux-mips@linux-mips.org, ralf@linux-mips.org
> Subject: Re: [PATCH] TX49 MFC0 bug workaround
> Content-Type: TEXT/PLAIN; charset=US-ASCII
> 
> On Fri, 3 Feb 2006, Atsushi Nemoto wrote:
> 
> > Workaround: mask EXL bit of the result or place a nop before mfc0.
> [...]
> > @@ -55,8 +56,13 @@ __asm__ (
> >     "       di                                                      \n"
> >  #else
> >     "       mfc0    $1,$12                                          \n"
> > +#if TX49XX_MFC0_WAR && defined(MODULE)
> > +   "       ori     $1,3                                            \n"
> > +   "       xori    $1,3                                            \n"
> > +#else
> >     "       ori     $1,1                                            \n"
> >     "       xori    $1,1                                            \n"
> > +#endif
> >     "       .set    noreorder                                       \n"
> >     "       mtc0    $1,$12                                          \n"
> >  #endif
> 
>  Hmm, wouldn't that "nop" alternative be simpler?

Simpler maybe - but this variant has zero runtime overhead.

  Ralf

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