From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7006 invoked by alias); 12 Feb 2004 19:56:24 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 6996 invoked from network); 12 Feb 2004 19:56:23 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 12 Feb 2004 19:56:23 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200] (may be forged)) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id i1CJuLb15412 for ; Thu, 12 Feb 2004 14:56:22 -0500 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i1CJuKM06481; Thu, 12 Feb 2004 14:56:20 -0500 Received: from redhat.com (reddwarf.sfbay.redhat.com [172.16.24.50]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id i1CJuIX27183; Thu, 12 Feb 2004 11:56:18 -0800 Message-ID: <402BDA62.3040906@redhat.com> Date: Thu, 12 Feb 2004 19:56:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 MIME-Version: 1.0 To: Michael Snyder CC: Joern Rennecke , Joern Rennecke , gdb-patches@sources.redhat.com Subject: Re: [RFA] sh-sim: thislock/prevlock tweak References: <200402061238.i16CcWl25143@linsvr1.uk.superh.com> <4023EC8B.6060308@redhat.com> In-Reply-To: <4023EC8B.6060308@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-02/txt/msg00324.txt.bz2 Michael Snyder wrote: > Joern Rennecke wrote: > >>> Joern, >>> >>> I don't fully understand this code, but it looks to me as if this >>> minor change is needed. Most other instructions appear to call >>> the macro "L()" for the register that was explicitly the target >>> of the instruction. >> >> >> >> Looks sensible as far as I can see it; it would be helpful to have >> enough context to see the full insn. > > > OK Can I take this as approved? > > > ------------------------------------------------------------------------ > > Index: gencode.c > =================================================================== > RCS file: /cvs/src/src/sim/sh/gencode.c,v > retrieving revision 1.26 > diff -p -5 -r1.26 gencode.c > *** gencode.c 27 Jan 2004 23:30:01 -0000 1.26 > --- gencode.c 6 Feb 2004 19:35:09 -0000 > *************** op tab[] = > *** 867,885 **** > { "0", "n", "movua.l @,R0", "0100nnnn10101001", > "int regn = R[n];", > "MA (1);", > "R[0] = (RBAT (regn) << 24) + (RBAT (regn + 1) << 16) + ", > " (RBAT (regn + 2) << 8) + RBAT (regn + 3);", > ! "L (n);", > }, > { "0n", "n", "movua.l @+,R0", "0100nnnn11101001", > "int regn = R[n];", > "MA (1);", > "R[0] = (RBAT (regn) << 24) + (RBAT (regn + 1) << 16) + ", > " (RBAT (regn + 2) << 8) + RBAT (regn + 3);", > "R[n] += 4;", > ! "L (n);", > }, > { "", "mn", "mul.l ,", "0000nnnnmmmm0111", > "MACL = ((int) R[n]) * ((int) R[m]);", > }, > #if 0 /* FIXME: The above cast to int is not really portable. > --- 867,885 ---- > { "0", "n", "movua.l @,R0", "0100nnnn10101001", > "int regn = R[n];", > "MA (1);", > "R[0] = (RBAT (regn) << 24) + (RBAT (regn + 1) << 16) + ", > " (RBAT (regn + 2) << 8) + RBAT (regn + 3);", > ! "L (0);", > }, > { "0n", "n", "movua.l @+,R0", "0100nnnn11101001", > "int regn = R[n];", > "MA (1);", > "R[0] = (RBAT (regn) << 24) + (RBAT (regn + 1) << 16) + ", > " (RBAT (regn + 2) << 8) + RBAT (regn + 3);", > "R[n] += 4;", > ! "L (0);", > }, > { "", "mn", "mul.l ,", "0000nnnnmmmm0111", > "MACL = ((int) R[n]) * ((int) R[m]);", > }, > #if 0 /* FIXME: The above cast to int is not really portable.