Saturday, 25 August 2012

Re: [Rpcemu] Code not working correctly on RPCEmu

Hi Matthew,

I was looking at the RPCEmu repository today to see what changed
since the last official release and noticed that the fix below
did not find its way into the repository.

> -----Message d'origine-----
> De : mhowkins@gmail.com [mailto:mhowkins@gmail.com] De la part de
> Matthew Howkins
> Envoyé : dimanche 26 février 2012 21:05
> À : Timmermans, Andre
> Cc : rpcemu@riscos.info
> Objet : Re: [Rpcemu] Code not working correctly on RPCEmu
>
> > I have included an archive for testing.
> >
> > The BASIC code Filter conrains some assembler code
> > which takes the file IN and produces a file OUT
> > so it is better set te CSD before running it.
> >
> > The non-recompiling version of RPCEmu produces a file identical
> > to OUR_REF (te output on my RPC). The recompling version
> > does not. Since most of the time the filter seems to work fine
> > in the player that uses it (the sound seems OK), I am wondering
> > if the small amplitude of the signed 16-bit input samples
> > combined to the 24-25 bits in size filter parameters
> > puts them right on the 32-bit boundary and I am wondering
> > if it is not the 64bit addition part of the SMLAL which
> > is not emulated correctly (i.e. is the carry transmitted
> > correctly from the addition of the lower 32-bit registers
> > To the upper 32-bits?).
>
> Thanks for the test program - this enabled me to quickly narrow down
> the problem, and confirm that there were no other faults affecting
> this issue.
>
> The problem does indeed lie with SMLAL.
>
> Can you test by changing line 1181 of codegen_x86.c from
>
> addbyte(0x01); addbyte(0xCA); /*ADDL %ecx,%edx*/
>
> to
>
> addbyte(0x11); addbyte(0xCA); /*ADCL %ecx,%edx*/
>
> This works for me - can you confirm it works for you?
>
> Thanks
>
> Matthew

_______________________________________________
Rpcemu mailing list
Rpcemu@riscos.info
http://www.riscos.info/cgi-bin/mailman/listinfo/rpcemu

No comments:

Post a Comment