[patch] correct handling of lswx and mtfsfi instructions in ppc simulator

Andrew Cagney ac131313@cygnus.com
Sat Mar 23 13:15:00 GMT 2002


> 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 <jducourt@noos.fr>
> * 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





More information about the Gdb-patches mailing list