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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-7.2/] [sim/] [testsuite/] [sim/] [v850/] [bsh.cgs] - Rev 438

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

# v850 bsh
# mach: v850e
# as(v850e): -mv850e

        .include "testutils.inc"

        seti    0x12345678, r1
        bsh     r1, r2

        flags   0
        reg     r2, 0x34127856

# CY is 1 if one or more bytes in the result half-word is zero, else 0

        seti    0x12345600, r1
        bsh     r1, r2
        flags   c
        reg     r2, 0x34120056

        seti    0x12340078, r1
        bsh     r1, r2
        flags   c
        reg     r2, 0x34127800

        seti    0x12005678, r1
        bsh     r1, r2
        flags   0
        reg     r2, 0x00127856

        seti    0x00345678, r1
        bsh     r1, r2
        flags   0
        reg     r2, 0x34007856

# S is set if the result is negative

        seti    0x00800000, r1
        bsh     r1, r2
        flags   s + c + z
        reg     r2, 0x80000000

# Z is set if the result is zero
# According to NEC, the Z flag depends on only the lower half-word

        seti    0x00000000, r1
        bsh     r1, r2
        flags   c + z
        reg     r2, 0x00000000

        seti    0xffff0000, r1
        bsh     r1, r2
        flags   c + s + z
        reg     r2, 0xffff0000

        pass

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.