Thread: Bitfields BFFFO
View Single Post
Old 21 November 2015, 17:12   #16
flype
Registered User

flype's Avatar
 
Join Date: Dec 2014
Location: France
Posts: 66
Just checked also the CCR results.

All good here, same on real 030 and WinUAE with the latest fix.

Code:
    MACHINE MC68030

Start:
    clr.l   d5               ; bitfield result
    clr.l   d6               ; bitfield ccr
    lea     values,a0        ; load rows
    move.l  (a0)+,d7         ; load number of rows
Loop:
    move.l  (a0)+,d0         ; load <ea>
    move.l  (a0)+,d1         ; load offset
    move.l  (a0)+,d2         ; load width
    move.l  (a0)+,d3         ; load precalc result
    move.l  (a0)+,d4         ; load precalc ccr
    bfffo   d0{d1:d2},d5     ; store bitfield result
    move.w  ccr,d6           ; store bitfield ccr
    sub.l   d3,d5            ; check bitfield result
    sub.l   d4,d6            ; check bitfield ccr
    dbf     d7,Loop          ; continue
Exit:
    stop    #-1              ; stop

values:
    dc.l    9
    ;              d0,       d1,       d2,       d3,       d4
    dc.l    $ffffff00,$ffffff00,$7fffffe0,$ffffff00,$00000008
    dc.l    $00000000,$ffffffff,$7fffffe0,$0000001f,$00000004
    dc.l    $00000000,$00000000,$7fffffe0,$00000020,$00000004
    dc.l    $00000000,$00000020,$7fffffe0,$00000040,$00000004
    dc.l    $1badcafe,$000000ff,$000000ff,$00000103,$00000000
    dc.l    $1badcafe,$0000007f,$0000007f,$00000083,$00000000
    dc.l    $1badcafe,$00000020,$00000020,$00000023,$00000000
    dc.l    $1badcafe,$00000020,$00000003,$00000023,$00000004
    dc.l    $1badcafe,$00000020,$00000002,$00000022,$00000004
    dc.l    $1badcafe,$00000020,$00000001,$00000021,$00000004
flype is offline  
 
Page generated in 0.04582 seconds with 9 queries