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/] [and.cgs] - Blame information for rev 26

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 26 jlechner
# sh testcase for and $rm, $rn, $rd -*- Asm -*-
2
# mach: all
3
# as: -isa=shmedia
4
# ld: -m shelf64
5
 
6
        .include "media/testutils.inc"
7
 
8
        start
9
 
10
init:
11
        pta wrong, tr0
12
 
13
and0:
14
        # 0 and 0 is 0.
15
        movi 0, r0
16
        movi 0, r1
17
        and r0, r1, r2
18
        bnei r2, 0, tr0
19
 
20
and1:
21
        # 0 and 1 is 0.
22
        movi 0, r0
23
        movi 1, r1
24
        and r0, r1, r2
25
        bnei r2, 0, tr0
26
 
27
and2:
28
        # 1 and 0 is 0.
29
        movi 1, r0
30
        movi 0, r1
31
        and r0, r1, r2
32
        bnei r2, 0, tr0
33
 
34
and3:
35
        # 1 and 1 is 1.
36
        movi 1, r0
37
        movi 1, r1
38
        and r0, r1, r2
39
        bnei r2, 1, tr0
40
 
41
and4:
42
        movi 1, r0
43
        shlli r0, 63, r0
44
        movi 1, r1
45
        shlli r1, 63, r1
46
        and r0, r1, r2
47
        # Check it.
48
        movi 1, r3
49
        shlli r3, 63, r3
50
        bne r2, r3, tr0
51
 
52
and5:
53
        movi 1, r0
54
        shlli r0, 63, r0
55
        movi 1, r1
56
        shlli r1, 63, r1
57
        ori r1, 1, r1
58
        and r0, r1, r2
59
        # Check it.
60
        movi 1, r3
61
        shlli r1, 63, r1
62
        bne r1, r2, tr0
63
 
64
okay:
65
        pass
66
 
67
wrong:
68
        fail

powered by: WebSVN 2.1.0

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