public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: Joern Rennecke <amylaar@onetel.net.uk>
To: cgen@sources.redhat.com
Cc: kkojima@rr.iij4u.or.jp (Kaz Kojima), aoliva@redhat.com
Subject: RFA: sh64-media.cpu make-mextr bug fix (Was: PATCH/RFA]: SHmedia trampoline)
Date: Thu, 16 Jan 2003 23:52:00 -0000	[thread overview]
Message-ID: <200301170002.AAA05507@meolyon.local> (raw)

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))))))
  

             reply	other threads:[~2003-01-16 23:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-16 23:52 Joern Rennecke [this message]
2003-01-17  5:44 ` Ben Elliston

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200301170002.AAA05507@meolyon.local \
    --to=amylaar@onetel.net.uk \
    --cc=aoliva@redhat.com \
    --cc=cgen@sources.redhat.com \
    --cc=kkojima@rr.iij4u.or.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).