OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [tags/] [gdb/] [gdb-6.8/] [gdb-6.8.openrisc-2.1/] [sim/] [testsuite/] [sim/] [fr30/] [div0s.cgs] - Diff between revs 24 and 33

Only display areas with differences | Details | Blame | View Log

Rev 24 Rev 33
# fr30 testcase for div0s $Ri
# fr30 testcase for div0s $Ri
# mach(): fr30
# mach(): fr30
        .include "testutils.inc"
        .include "testutils.inc"
        START
        START
        .text
        .text
        .global div0s
        .global div0s
div0s:
div0s:
        ; Test div0s $Rj,$Ri
        ; Test div0s $Rj,$Ri
        ; example from the manual - negative dividend
        ; example from the manual - negative dividend
        mvi_h_gr        0x0fffffff,r2
        mvi_h_gr        0x0fffffff,r2
        mvi_h_dr        0x00000000,mdh
        mvi_h_dr        0x00000000,mdh
        mvi_h_dr        0xfffffff0,mdl
        mvi_h_dr        0xfffffff0,mdl
        set_dbits       0x0             ; Set opposite of expected
        set_dbits       0x0             ; Set opposite of expected
        set_cc          0x0f            ; Condition codes should not change
        set_cc          0x0f            ; Condition codes should not change
        div0s           r2
        div0s           r2
        test_cc         1 1 1 1
        test_cc         1 1 1 1
        test_h_gr       0x0fffffff,r2
        test_h_gr       0x0fffffff,r2
        test_h_dr       0xffffffff,mdh
        test_h_dr       0xffffffff,mdh
        test_h_dr       0xfffffff0,mdl
        test_h_dr       0xfffffff0,mdl
        test_dbits      0x3
        test_dbits      0x3
        ; negative divisor
        ; negative divisor
        mvi_h_gr        0xffffffff,r2
        mvi_h_gr        0xffffffff,r2
        mvi_h_dr        0xffffffff,mdh
        mvi_h_dr        0xffffffff,mdh
        mvi_h_dr        0x7fffffff,mdl
        mvi_h_dr        0x7fffffff,mdl
        set_dbits       0x1             ; Set opposite of expected
        set_dbits       0x1             ; Set opposite of expected
        set_cc          0x0f            ; Condition codes should not change
        set_cc          0x0f            ; Condition codes should not change
        div0s           r2
        div0s           r2
        test_cc         1 1 1 1
        test_cc         1 1 1 1
        test_h_gr       0xffffffff,r2
        test_h_gr       0xffffffff,r2
        test_h_dr       0x00000000,mdh
        test_h_dr       0x00000000,mdh
        test_h_dr       0x7fffffff,mdl
        test_h_dr       0x7fffffff,mdl
        test_dbits      0x2
        test_dbits      0x2
        ; Both sign bits 0
        ; Both sign bits 0
        mvi_h_gr        0x0fffffff,r2
        mvi_h_gr        0x0fffffff,r2
        mvi_h_dr        0xffffffff,mdh
        mvi_h_dr        0xffffffff,mdh
        mvi_h_dr        0x7ffffff0,mdl
        mvi_h_dr        0x7ffffff0,mdl
        set_dbits       0x3             ; Set opposite of expected
        set_dbits       0x3             ; Set opposite of expected
        set_cc          0x0f            ; Condition codes should not change
        set_cc          0x0f            ; Condition codes should not change
        div0s           r2
        div0s           r2
        test_cc         1 1 1 1
        test_cc         1 1 1 1
        test_h_gr       0x0fffffff,r2
        test_h_gr       0x0fffffff,r2
        test_h_dr       0x00000000,mdh
        test_h_dr       0x00000000,mdh
        test_h_dr       0x7ffffff0,mdl
        test_h_dr       0x7ffffff0,mdl
        test_dbits      0x0
        test_dbits      0x0
        ; Both sign bits 1
        ; Both sign bits 1
        mvi_h_gr        0xffffffff,r2
        mvi_h_gr        0xffffffff,r2
        mvi_h_dr        0x00000000,mdh
        mvi_h_dr        0x00000000,mdh
        mvi_h_dr        0xffffffff,mdl
        mvi_h_dr        0xffffffff,mdl
        set_dbits       0x2             ; Set opposite of expected
        set_dbits       0x2             ; Set opposite of expected
        set_cc          0x0f            ; Condition codes should not change
        set_cc          0x0f            ; Condition codes should not change
        div0s           r2
        div0s           r2
        test_cc         1 1 1 1
        test_cc         1 1 1 1
        test_h_gr       0xffffffff,r2
        test_h_gr       0xffffffff,r2
        test_h_dr       0xffffffff,mdh
        test_h_dr       0xffffffff,mdh
        test_h_dr       0xffffffff,mdl
        test_h_dr       0xffffffff,mdl
        test_dbits      0x1
        test_dbits      0x1
        pass
        pass
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.