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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-6.8/] [sim/] [testsuite/] [sim/] [sh64/] [compact/] [addv.cgs] - Diff between revs 24 and 157

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

Rev 24 Rev 157
# sh testcase for addv $rm, $rn -*- Asm -*-
# sh testcase for addv $rm, $rn -*- Asm -*-
# mach: all
# mach: all
# as: -isa=shcompact
# as: -isa=shcompact
# ld: -m shelf32
# ld: -m shelf32
        .include "compact/testutils.inc"
        .include "compact/testutils.inc"
        start
        start
zero:
zero:
        mov #0, r0
        mov #0, r0
        mov #0, r1
        mov #0, r1
        addv r0, r1
        addv r0, r1
        # Assert !T and #0.
        # Assert !T and #0.
        bt wrong
        bt wrong
        assert r1, #0
        assert r1, #0
one:
one:
        mov #0, r0
        mov #0, r0
        mov #1, r1
        mov #1, r1
        addv r0, r1
        addv r0, r1
        # Assert !T and #1.
        # Assert !T and #1.
        bt wrong
        bt wrong
        assert r1, #1
        assert r1, #1
large:
large:
        # Produce MAXINT in R0.
        # Produce MAXINT in R0.
        mov #0, r0
        mov #0, r0
        not r0, r0
        not r0, r0
        shlr r0
        shlr r0
        # Put #3 into R1.
        # Put #3 into R1.
        mov #3, r1
        mov #3, r1
        # Add them and overflow.
        # Add them and overflow.
        addv r0, r1
        addv r0, r1
        # Assert T and overflowed value.
        # Assert T and overflowed value.
        bf wrong
        bf wrong
        mov #1, r7
        mov #1, r7
        rotr r7
        rotr r7
        add #2, r7
        add #2, r7
        cmp/eq r1, r7
        cmp/eq r1, r7
        bf wrong
        bf wrong
okay:
okay:
        pass
        pass
wrong:
wrong:
        fail
        fail
 
 

powered by: WebSVN 2.1.0

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