Re: [hatari-devel] [Bug found] : divul.l

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


> I.e. in your case D3 register wouldn't be used in calculation, only in storing part of the result... I.e. D4/100000 result is 0/0, stored in D4/D3 as D4 was zero. What do you get if you use instead: divul.l #100000,d4:d3 (Or did I misunderstand?)


I've tested again, and it seems OK now

Here is my new code for the test :

        move.w        #100,d3
        move.w        #500,d4
        divul.l        #10000,d3:d4

Sorry to disturb. (but at least, the debugger and disassembler are again wrong)

CPU=$5bf88, VBL=5982, FrameCycles=69258, HBL=302, LineCycles=200, DSP=$51
> r
  D0 00000000   D1 00000000   D2 00000000   D3 00000000
  D4 00000000   D5 00000000   D6 00000000   D7 00000000
  A0 00000000   A1 00000000   A2 00000000   A3 00000000
  A4 0005BF98   A5 0005BF98   A6 00DC16C6   A7 00DC16F8
USP  00DC16F8 ISP  00008870 SFC  00000000 DFC  00000000
CACR 00000000 VBR  00000000 CAAR 00000000 MSP  00000000
T=00 S=0 M=0 X=0 N=0 Z=0 V=0 C=0 IMASK=3 STP=0
FP0: 0 FP1: 0 FP2: 0 FP3: 0
FP4: 0 FP5: 0 FP6: 0 FP7: 0
N=0 Z=0 I=0 NAN=0
0005BF88 363c 0064                MOVE.W #$0064,D3
Next PC: 0005bf8c
> trace cpu_disasm
> c 3
Returning to emulation for 3 CPU instructions...
cpu video_cyc= 69258 200@302 : 0005BF88 363c 0064 MOVE.W #$0064,D3
cpu video_cyc= 69262 204@302 : 0005BF8C 383c 01f4 MOVE.W #$01f4,D4

CPU=$5bf90, VBL=5982, FrameCycles=69266, HBL=302, LineCycles=208, DSP=$51
> r
  D0 00000000   D1 00000000   D2 00000000   D3 00000064
  D4 000001F4   D5 00000000   D6 00000000   D7 00000000
  A0 00000000   A1 00000000   A2 00000000   A3 00000000
  A4 0005BF98   A5 0005BF98   A6 00DC16C6   A7 00DC16F8
USP  00DC16F8 ISP  00008870 SFC  00000000 DFC  00000000
CACR 00000000 VBR  00000000 CAAR 00000000 MSP  00000000
T=00 S=0 M=0 X=0 N=0 Z=0 V=0 C=0 IMASK=3 STP=0
FP0: 0 FP1: 0 FP2: 0 FP3: 0
FP4: 0 FP5: 0 FP6: 0 FP7: 0
N=0 Z=0 I=0 NAN=0
0005BF90 4c7c 4003 0000 2710      DIVL.L #$4003,#$00002710
Next PC: 0005bf98

> c1

CPU=$5bf98, VBL=5982, FrameCycles=69312, HBL=303, LineCycles=2, DSP=$51
> r
  D0 00000000   D1 00000000   D2 00000000   D3 000001F4
  D4 00000000   D5 00000000   D6 00000000   D7 00000000
  A0 00000000   A1 00000000   A2 00000000   A3 00000000
  A4 0005BF98   A5 0005BF98   A6 00DC16C6   A7 00DC16F8
USP  00DC16F8 ISP  00008870 SFC  00000000 DFC  00000000
CACR 00000000 VBR  00000000 CAAR 00000000 MSP  00000000
T=00 S=0 M=0 X=0 N=0 Z=1 V=0 C=0 IMASK=3 STP=0
FP0: 0 FP1: 0 FP2: 0 FP3: 0
FP4: 0 FP5: 0 FP6: 0 FP7: 0
N=0 Z=0 I=0 NAN=0
0005BF98 0000 0000                OR.B #$00,D0
Next PC: 0005bf9c

Regards

Laurent




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