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/] [mull.cgs] - Diff between revs 24 and 157

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

Rev 24 Rev 157
# sh testcase for mul.l $rm, $rn -*- Asm -*-
# sh testcase for mul.l $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
        .global mull
        .global mull
mull:
mull:
        mov #3, r0
        mov #3, r0
        mov #5, r1
        mov #5, r1
        mul.l r0, r1
        mul.l r0, r1
        # Check the result.
        # Check the result.
        sts macl, r3
        sts macl, r3
        mov #15, r4
        mov #15, r4
        cmp/eq r3, r4
        cmp/eq r3, r4
        bf wrong
        bf wrong
lxs:
lxs:
        # Large * small.
        # Large * small.
        mov #255, r0
        mov #255, r0
        mov #0, r1
        mov #0, r1
        mul.l r0, r1
        mul.l r0, r1
        # Check the result.
        # Check the result.
        sts macl, r3
        sts macl, r3
        mov #0, r4
        mov #0, r4
        cmp/eq r3, r4
        cmp/eq r3, r4
        bf wrong
        bf wrong
sxl:
sxl:
        # Small * large.
        # Small * large.
        mov #0, r0
        mov #0, r0
        mov #255, r1
        mov #255, r1
        mul.l r0, r1
        mul.l r0, r1
        # Check the result.
        # Check the result.
        sts macl, r3
        sts macl, r3
        mov #0, r4
        mov #0, r4
        cmp/eq r3, r4
        cmp/eq r3, r4
        bf wrong
        bf wrong
lxl:
lxl:
        # Large * large.
        # Large * large.
        mov #1, r0
        mov #1, r0
        neg r0, r0
        neg r0, r0
        mov #2, r1
        mov #2, r1
        mul.l r0, r1
        mul.l r0, r1
        # Check the result.
        # Check the result.
        sts macl, r3
        sts macl, r3
        mov #2, r4
        mov #2, r4
        neg r4, r4
        neg r4, r4
        cmp/eq r3, r4
        cmp/eq r3, r4
        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.