Re: [hatari-devel] DSP bug: need more explanations

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]



Yes, but for the third iteration, if there was pipeline effect, I think that at the end of the movem, R0 = 1 and not 2 (as R1 in the second iteration = 1 and writes its value to p:$118)
Not so sure about this. If I didn't overlook something, then:

; we start with r0 = 0

1. iteration:
    movem p:$0118,r0 ; r0 = 0
    lua (r0)+,r1 ; we use the old r0 which happens to be 0, too, i.e. 0+1 = 1
    nop 
    movem r1,p:$0118 ; store r1 = 1 into $118

2. iteration:
    movem p:$0118,r0 ; r0 = 1
    lua (r0)+,r1 ; we use the old r0, last r0 value is still zero, i.e. 0+1 = 1
    nop 
    movem r1,p:$0118 ; store r1 = 1 into $118

3. iteration:
    movem p:$0118,r0 ; r0 = 1
    lua (r0)+,r1 ; we use the old r0, last r0 value is 1 (from the previous iteration, not the line above!), i.e. 1+1 = 2
    nop 
    movem r1,p:$0118 ; store r1 = 2 into $118

4. iteration:
    movem p:$0118,r0 ; r0 = 2
    lua (r0)+,r1 ; we use the old r0, last r0 value is 1, i.e. 1+1 = 2
    nop 
    movem r1,p:$0118 ; store r1 = 2 into $118

5. iteration:
    movem p:$0118,r0 ; r0 = 2
    lua (r0)+,r1 ; we use the old r0, last r0 value is 2, i.e. 2+1 = 3
    nop 
    movem r1,p:$0118 ; store r1 = 3 into $118

:
:


--
MiKRO / Mystic Bytes
http://mikro.atari.org


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/