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

Subversion Repositories openrisc

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

Go to most recent revision | Compare with Previous | Blame | View Log

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

        .include "compact/testutils.inc"

        .macro signbit sign
        mov r1, r2
        shlr16 r2
        shlr8 r2
        shlr r2
        shlr r2
        shlr r2
        shlr r2
        shlr r2
        shlr r2
        shlr r2
        assert r2, \sign
        .endm
        start

        .global negc
negc:
        clrt
        mov #1, r0
        negc r0, r1
        signbit #1

negc2:
        sett
        mov #1, r0
        negc r0, r1
        signbit #1

negc3:
        clrt
        mov #0, r0
        negc r0, r1
        signbit #0

negc4:
        sett
        mov #0, r0
        negc r0, r1
        signbit #1

negc5:
        clrt
        mov #0, r0
        or #255, r0
        negc r0, r1
        signbit #1

negc6:
        sett
        mov #0, r0
        or #255, r0
        negc r0, r1
        signbit #1

okay:
        pass

wrong:
        fail

Go to most recent revision | 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.