public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
* RFA: sh64-media.cpu make-mextr bug fix (Was: PATCH/RFA]: SHmedia trampoline)
@ 2003-01-16 23:52 Joern Rennecke
  2003-01-17  5:44 ` Ben Elliston
  0 siblings, 1 reply; 2+ messages in thread
From: Joern Rennecke @ 2003-01-16 23:52 UTC (permalink / raw)
  To: cgen; +Cc: Kaz Kojima, aoliva

Kaz Kojima wrote on gcc-patches:
> With running C testsuite on sh5-linux, I've found that tests using
> nested functions failed. The attached change of the 32-bit SHmedia
> trampoline fixes such regressions on sh64-unknown-linux-gnu for 
> mainline.

> 2003-01-15  Kaz Kojima  <kkojima@gcc.gnu.org>
> 
>         * config/sh/sh.c (sh_initialize_trampoline): Emit rotrdi3_mextr
>         instead of rotldi3_mextr.

And I replied:

> Good catch.  This bug remained undetected for such a long time because
> it mirrors a bug in the cgen simulator.

This is the corresponding patch for cgen:

Thu Jan 16 22:08:57 2003  J"orn Rennecke <amylaar@onetel.net.uk>

	* cpu/sh64-media.cpu (make-mextr): Fix setting of count.

Index: cpu/sh64-media.cpu
===================================================================
RCS file: /cvs/src/src/cgen/cpu/sh64-media.cpu,v
retrieving revision 1.2
diff -p -r1.2 sh64-media.cpu
*** cpu/sh64-media.cpu	25 Jun 2002 17:17:45 -0000	1.2
--- cpu/sh64-media.cpu	16 Jan 2003 21:57:17 -0000
***************
*** 1120,1129 ****
  	 (.str "mextr" n " $rm, $rn, $rd")
  	 (+ (f-op op) rm (f-ext extop) rn rd (f-rsvd 0))
  	 (sequence ((QI count) (DI mask) (DI rhs))
! 		   (set count (mul QI 8 (sub QI 8 n)))
  		   (set mask (sll DI (inv 0) count))
  		   (set rhs (srl (and rm mask) count))
! 		   (set count (mul QI 8 n))
  		   (set mask (srl DI (inv 0) count))
  		   (set rd (or DI rhs (sll DI (and rn mask) count))))))
  
--- 1120,1129 ----
  	 (.str "mextr" n " $rm, $rn, $rd")
  	 (+ (f-op op) rm (f-ext extop) rn rd (f-rsvd 0))
  	 (sequence ((QI count) (DI mask) (DI rhs))
! 		   (set count (mul QI 8 n))
  		   (set mask (sll DI (inv 0) count))
  		   (set rhs (srl (and rm mask) count))
! 		   (set count (mul QI 8 (sub QI 8 n)))
  		   (set mask (srl DI (inv 0) count))
  		   (set rd (or DI rhs (sll DI (and rn mask) count))))))
  

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

* Re: RFA: sh64-media.cpu make-mextr bug fix (Was: PATCH/RFA]: SHmedia trampoline)
  2003-01-16 23:52 RFA: sh64-media.cpu make-mextr bug fix (Was: PATCH/RFA]: SHmedia trampoline) Joern Rennecke
@ 2003-01-17  5:44 ` Ben Elliston
  0 siblings, 0 replies; 2+ messages in thread
From: Ben Elliston @ 2003-01-17  5:44 UTC (permalink / raw)
  To: cgen

>>>>> "Joern" == Joern Rennecke <amylaar@onetel.net.uk> writes:

  >> Good catch.  This bug remained undetected for such a long time because
  >> it mirrors a bug in the cgen simulator.

  Joern> This is the corresponding patch for cgen:
  Joern> Thu Jan 16 22:08:57 2003  J"orn Rennecke <amylaar@onetel.net.uk>
  Joern> 	* cpu/sh64-media.cpu (make-mextr): Fix setting of count.

Approved.  Please commit it.

Ben

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

end of thread, other threads:[~2003-01-17  5:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-16 23:52 RFA: sh64-media.cpu make-mextr bug fix (Was: PATCH/RFA]: SHmedia trampoline) Joern Rennecke
2003-01-17  5:44 ` Ben Elliston

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).