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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gdb/] [gdb-6.8/] [sim/] [testsuite/] [sim/] [sh64/] [media/] [mpermw.cgs] - Rev 26

Compare with Previous | Blame | View Log

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

        .include "media/testutils.inc"

        start
init:
        pta wrong, tr0
        movi 27, r1
        movi 0x1020, r0
        shlli r0, 8, r0
        ori r0, 0x30, r0
        shlli r0, 8, r0
        ori r0, 0x40, r0
        shlli r0, 8, r0
        ori r0, 0x50, r0
        shlli r0, 8, r0
        ori r0, 0x60, r0
        shlli r0, 8, r0
        ori r0, 0x70, r0
        shlli r0, 8, r0
        ori r0, 0x80, r0

mpermw:
        mperm.w r0, r1, r2

check:
        # Expect 0x7080506030401020.
        movi 0x7080, r0
        shlli r0, 8, r0
        ori r0, 0x50, r0
        shlli r0, 8, r0
        ori r0, 0x60, r0
        shlli r0, 8, r0
        ori r0, 0x30, r0
        shlli r0, 8, r0
        ori r0, 0x40, r0
        shlli r0, 8, r0
        ori r0, 0x10, r0
        shlli r0, 8, r0
        ori r0, 0x20, r0

        bne r0, r2, 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.