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

Subversion Repositories openrisc

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

Compare with Previous | Blame | View Log

# sh testcase for byterev $rm, $rd -*- Asm -*-
# mach: all
# as: -isa=shmedia
# ld: -m shelf64

        .include "media/testutils.inc"

        start
        pta wrong, tr0
init:
        # Put a distinctive pattern in r0.
        movi 10, r0
        shlli r0, 8, r0
        ori r0, 20, r0
        shlli r0, 8, r0
        ori r0, 30, r0
        shlli r0, 8, r0
        ori r0, 40, r0
        shlli r0, 8, r0
        ori r0, 50, r0
        shlli r0, 8, r0
        ori r0, 60, r0
        shlli r0, 8, r0
        ori r0, 70, r0
        shlli r0, 8, r0
        ori r0, 80, r0

byterev:
        byterev r0, r1

check:
        andi r1, 255, r2
        movi 10, r3
        bne r2, r3, tr0
        shlri r1, 8, r1
        andi r1, 255, r2
        movi 20, r3
        bne r2, r3, tr0
        shlri r1, 8, r1
        andi r1, 255, r2
        movi 30, r3
        bne r2, r3, tr0
        shlri r1, 8, r1
        andi r1, 255, r2
        movi 40, r3
        bne r2, r3, tr0
        shlri r1, 8, r1
        andi r1, 255, r2
        movi 50, r3
        bne r2, r3, tr0
        shlri r1, 8, r1
        andi r1, 255, r2
        movi 60, r3
        bne r2, r3, tr0
        shlri r1, 8, r1
        andi r1, 255, r2
        movi 70, r3
        bne r2, r3, tr0
        shlri r1, 8, r1
        andi r1, 255, r2
        movi 80, r3
        bne r2, r3, tr0

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.