From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30904 invoked by alias); 23 Mar 2002 21:15:53 -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 30897 invoked from network); 23 Mar 2002 21:15:52 -0000 Received: from unknown (HELO localhost.redhat.com) (24.112.240.27) by 209.249.29.67 with SMTP; 23 Mar 2002 21:15:52 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 33C753DCE; Sat, 23 Mar 2002 16:15:39 -0500 (EST) Message-ID: <3C9CF07A.1080300@cygnus.com> Date: Sat, 23 Mar 2002 13:15:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.8) Gecko/20020210 X-Accept-Language: en-us MIME-Version: 1.0 To: Julien Ducourthial Cc: gdb-patches@sources.redhat.com Subject: Re: [patch] correct handling of lswx and mtfsfi instructions in ppc simulator References: <1007887536.12196.1.camel@athlon_force.localdomain> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-03/txt/msg00449.txt.bz2 > Hi, > > When running a program (which works ok on PPC boards) in the simulator: > * the lswx instruction generates exceptions where it should not, > * the mtfsi instruction is not recognized at all. > > After checking ppc-instructions : > * it seems there are a few typos in the registers handling in > lswx (using bytes or bits index instead of register numbers). Yep. > * the prefix of mtfsfi is 64 instead of 63 (from "Powerpc : The > Programming Environment"). Yes. > the patch below fixes both problems. > > 2001-12-09 Julien Ducourthial > * ppc-instructions (lswx): do the register control with the > register count. Initialize the right register in the loop. > * (mtfsfi) : correct prefix for the instruction. Thanks. Andrew