Linux MIPS Architecture development
 help / color / mirror / Atom feed
* Disabling lwl and lwr instruction generation
@ 2003-03-12 18:05 Ranjan Parthasarathy
  2003-03-13  0:43 ` Ralf Baechle
  0 siblings, 1 reply; 13+ messages in thread
From: Ranjan Parthasarathy @ 2003-03-12 18:05 UTC (permalink / raw)
  To: 'linux-mips@linux-mips.org'

Is there a way to tell gcc to not generate the lwl, lwr instructions?

Thanks

Ranjan

^ permalink raw reply	[flat|nested] 13+ messages in thread
* RE: Disabling lwl and lwr instruction generation
@ 2003-03-13 18:00 Ranjan Parthasarathy
  2003-03-13 18:00 ` Ranjan Parthasarathy
  0 siblings, 1 reply; 13+ messages in thread
From: Ranjan Parthasarathy @ 2003-03-13 18:00 UTC (permalink / raw)
  To: Ralf Baechle, Richard Hodges; +Cc: linux-mips

Thanks for all your replies and no I am not working on the chinese processor :-). BTW it would be nice to have a mips option on override cpu options for disabling the lwl,lwr,swl,swr similar to "Cpu has ll/sc".

Thanks

Ranjan

-----Original Message-----
From: Ralf Baechle [mailto:ralf@linux-mips.org]
Sent: Wednesday, March 12, 2003 5:34 PM
To: Richard Hodges
Cc: Ranjan Parthasarathy; 'linux-mips@linux-mips.org'
Subject: Re: Disabling lwl and lwr instruction generation


On Wed, Mar 12, 2003 at 04:50:53PM -0800, Richard Hodges wrote:

> I got lwl and lwr from a memcpy() with two void pointers...
> 
> I quickly changed those to the (aligned) structure pointers instead, and
> then memcpy() changed to ordinary word loads and stores.
> 
> So, is somebody starting a toolchain for that new Chinese CPU? :-)

Wouldn't be the first processor without lwl/lwr instructions.  There have
been a few that didn't implement it for silly bean^Wgate counting issues
others have done it for patent and licensing reasons.

(Afair MIPS's patent is about to expire and IBM's prior art patent in the
same area is even way older but that legalese ...)

  Ralf

^ permalink raw reply	[flat|nested] 13+ messages in thread
* RE: Disabling lwl and lwr instruction generation
@ 2003-03-13 18:09 Ranjan Parthasarathy
  2003-03-13 18:09 ` Ranjan Parthasarathy
  2003-03-13 21:35 ` Ralf Baechle
  0 siblings, 2 replies; 13+ messages in thread
From: Ranjan Parthasarathy @ 2003-03-13 18:09 UTC (permalink / raw)
  To: Ralf Baechle, Richard Hodges; +Cc: linux-mips

From the gcc sources, the compiler generates the lwl,lwr etc. in the block move code in gcc/config/mips/mips.c ( output_block_move ). 

There is an option -mmemcpy which tells gcc to use a memcpy compiled in with the sources for this block move instead of gcc genetrating code. The problem however with this is that arch/mips/lib/memcpy.S is optimized using lwl,lwr,swl,swr. If this can be  modified so that lwl,lwr,swl,swr is used if enabled as a kernel option, it might work very well. 

Any ideas / suggestions?

Thanks

Ranjan

-----Original Message-----
From: Ralf Baechle [mailto:ralf@linux-mips.org]
Sent: Wednesday, March 12, 2003 5:34 PM
To: Richard Hodges
Cc: Ranjan Parthasarathy; 'linux-mips@linux-mips.org'
Subject: Re: Disabling lwl and lwr instruction generation


On Wed, Mar 12, 2003 at 04:50:53PM -0800, Richard Hodges wrote:

> I got lwl and lwr from a memcpy() with two void pointers...
> 
> I quickly changed those to the (aligned) structure pointers instead, and
> then memcpy() changed to ordinary word loads and stores.
> 
> So, is somebody starting a toolchain for that new Chinese CPU? :-)

Wouldn't be the first processor without lwl/lwr instructions.  There have
been a few that didn't implement it for silly bean^Wgate counting issues
others have done it for patent and licensing reasons.

(Afair MIPS's patent is about to expire and IBM's prior art patent in the
same area is even way older but that legalese ...)

  Ralf

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2003-03-13 23:12 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-12 18:05 Disabling lwl and lwr instruction generation Ranjan Parthasarathy
2003-03-13  0:43 ` Ralf Baechle
2003-03-13  0:50   ` Richard Hodges
2003-03-13  1:33     ` Ralf Baechle
2003-03-13 15:07     ` Zhang Fuxin
2003-03-13  0:52   ` Thiemo Seufer
2003-03-13  1:18     ` Ralf Baechle
  -- strict thread matches above, loose matches on Subject: below --
2003-03-13 18:00 Ranjan Parthasarathy
2003-03-13 18:00 ` Ranjan Parthasarathy
2003-03-13 18:09 Ranjan Parthasarathy
2003-03-13 18:09 ` Ranjan Parthasarathy
2003-03-13 21:35 ` Ralf Baechle
2003-03-14  0:21   ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox