This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


> 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




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]