From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31793 invoked by alias); 19 Dec 2007 14:55:42 -0000 Received: (qmail 31778 invoked by uid 22791); 19 Dec 2007 14:55:41 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 19 Dec 2007 14:55:37 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.1) with ESMTP id lBJEtZ2v004186 for ; Wed, 19 Dec 2007 09:55:35 -0500 Received: from pobox-3.corp.redhat.com (pobox-3.corp.redhat.com [10.11.255.67]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id lBJEtZvG001794; Wed, 19 Dec 2007 09:55:35 -0500 Received: from localhost.localdomain (vpn-15-133.rdu.redhat.com [10.11.15.133]) by pobox-3.corp.redhat.com (8.13.1/8.13.1) with ESMTP id lBJEtYRH018559; Wed, 19 Dec 2007 09:55:35 -0500 Message-ID: <47693096.70707@redhat.com> Date: Wed, 19 Dec 2007 14:59:00 -0000 From: Dave Brolley User-Agent: Thunderbird 2.0.0.9 (X11/20071115) MIME-Version: 1.0 To: DJ Delorie CC: gdb-patches@sourceware.org Subject: Re: [frv sim] clip cut point for MWCUT References: <200712182145.lBILjvWJ028114@greed.delorie.com> In-Reply-To: <200712182145.lBILjvWJ028114@greed.delorie.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-12/txt/msg00312.txt.bz2 Yes. Please commit this patch. Dave DJ Delorie wrote: > The MWCUT opcode only looks at the six LSBs of the cut point register. > The frv.c code was looking at the whole register, resulting in > incorrect cut results. This patch clips the cut_point argument to six > bits (0..63). Ok to apply? > > * frv/frv.c (frvbf_cut): Only look at the six LSBs of > cut_point. > > Index: frv.c > =================================================================== > RCS file: /cvs/src/src/sim/frv/frv.c,v > retrieving revision 1.9 > diff -p -U3 -r1.9 frv.c > --- frv.c 24 Aug 2007 14:28:36 -0000 1.9 > +++ frv.c 18 Dec 2007 21:42:50 -0000 > @@ -1055,6 +1055,7 @@ SI > frvbf_cut (SIM_CPU *current_cpu, SI reg1, SI reg2, SI cut_point) > { > SI result; > + cut_point &= 0x3f; > if (cut_point < 32) > { > result = reg1 << cut_point; >