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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gdb-6.8/] [sim/] [testsuite/] [sim/] [sh64/] [compact/] [shad.cgs] - Rev 840

Compare with Previous | Blame | View Log

# sh testcase for shad $rm, $rn -*- Asm -*-
# mach: all
# as: -isa=shcompact
# ld: -m shelf32

        .include "compact/testutils.inc"

        start

        .global null
null:
        mov #1, r0
        mov #0, r1
        shad r1, r0
        # no shift is performed.
        assert r0, #1

        .global gt0
gt0:
        mov #4, r0
        mov #3, r1
        shad r1, r0
        # shift left 3 bits.
        assert r0, #32

        .global lt0
lt0:
        mov #32, r0
        mov #3, r1
        neg r1, r1
        shad r1, r0
        # shift right 3 bits.
        assert r0, #4

        .global fillpos
fillpos:
        mov #1, r0
        mov #1, r1
        rotr r1
        shad r1, r0
        # check result.
        assert r0, #0

        .global fillneg
fillneg:
        mov #1, r0
        neg r0, r0
        mov #1, r1
        rotr r1
        shad r1, r0
        # check result.
        not r0, r0
        assert r0, #0
        
okay:
        pass
wrong:
        fail

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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