Hi,

I have been looking at te sources of version 0.8.9 to see why some of my code
doesn't work properly with the dynamic recompiler.

I have first compared arm.c and the ArmDynarecOps.c/h files. Here I have found 
only one  difference:

In function SWPWord() of ArmDynarecOps.h line 343 is "addr=armregs[RN]&~3;"
while the corresponding line 925 in arm.c is "addr=armregs[RN];".
I think the dynamic version is the correct one.

I have also looked at the file codegen_x86.c.

The function generateshiftflags() seems to be mishandling the C flag
(at least if the comments match te actual opcodes used).
According to te Acorn Assembler book and what I see in arm.c
the flag C is left untouched if no shift occurs
and flags NZV are always left untouched.

This means that code should look like :
/*MOVB *pcpsr,%cl*/
if (no shift)
   do nothing
else
    /*AND $ZFLAG+NFLAG,%cl*/
    do shift
    /*JNC nocarry*/
   /*OR $CFLAG,%cl*/

In the code it seems that flag C is always set to 0 if no shift occurs
and when a shift occurs it is sometimes set to 1 but never reset to 0.

Cheers,
André


Timmermans André
+32 02-5362244
[email protected]<mailto:[email protected]>
Chaussé de Liège 221
5100 Jambes
Belgium
[cid:428272814@16022012-0E1A]

Siemens IT Solutions and Services n.v./SA
RPR/RPM Brussels : 0459 540 270
Banks: BNP Paribas Fortis 210-0046976-80; KBC  482-9058191-06
As of July 1st 2011, Siemens IT Solutions and Services is an Atos business

<<inline: att8fbca.gif>>

_______________________________________________
Rpcemu mailing list
[email protected]
http://www.riscos.info/cgi-bin/mailman/listinfo/rpcemu

Reply via email to