From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5615 invoked by alias); 16 Jan 2003 23:52:56 -0000 Mailing-List: contact cgen-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cgen-owner@sources.redhat.com Received: (qmail 5608 invoked from network); 16 Jan 2003 23:52:53 -0000 Received: from unknown (HELO msgdirector2.onetel.net.uk) (212.67.96.149) by sources.redhat.com with SMTP; 16 Jan 2003 23:52:53 -0000 Received: from meolyon.local (213-78-67-146.friaco.onetel.net.uk [213.78.67.146]) by msgdirector2.onetel.net.uk (Mirapoint) with ESMTP id AOO58169; Thu, 16 Jan 2003 23:50:49 GMT Received: (from amylaar@localhost) by meolyon.local (8.9.3/8.9.3/SuSE Linux 8.9.3-0.1) id AAA05507; Fri, 17 Jan 2003 00:02:19 GMT From: Joern Rennecke Message-Id: <200301170002.AAA05507@meolyon.local> Subject: RFA: sh64-media.cpu make-mextr bug fix (Was: PATCH/RFA]: SHmedia trampoline) To: cgen@sources.redhat.com Date: Thu, 16 Jan 2003 23:52:00 -0000 Cc: kkojima@rr.iij4u.or.jp (Kaz Kojima), aoliva@redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2003-q1/txt/msg00026.txt.bz2 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 > > * 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 * 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))))))