[Top] [All Lists]

Re: lwl-lwr

To: "Gilad Benjamini" <>, <>
Subject: Re: lwl-lwr
From: "Kevin D. Kissell" <>
Date: Tue, 20 May 2003 21:07:26 +0200
Original-recipient: rfc822;
References: <>
> About two months ago there was a discussion
> here about disabling lwl-lwr.
> Can someone shed some light on why the discussion
> emerged ?
> Is this a performance issue, a processor which 
> doesn't support it, or something else ?
> If this is a performance issue, I'll be happy
> to hear more details.

I don't remember the discussion in question, but it's a question
which comes up from time to time, due to the existence of 
MIPS-like CPUs which lack the (patented) lwl/lwr mechanism
for dealing with unaligned data.  The Lexra cores, for example.

There's really no such thing as "disabling" lwl/lwr.  They are part 
of the base MIPS instruction set.  If one wants to live without them, 
one can either rig a compiler to emit multi-instruction sequences instead 
of lwr/lwl to do the appropriate shifts and masks (which is slower on all 
targets), or you can rig the OS to emulate them, and hope that the processors 
lacking support will take clean reserved instruction traps, where the function 
can be emulated (which is "free" for code running  on CPUs with lwl/lwr, 
but *really* slow for the guys doing emulation).

            Kevin K.

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