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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-6.8/] [sim/] [testsuite/] [sim/] [sh64/] [compact/] [dmulsl.cgs] - Blame information for rev 280

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

Line No. Rev Author Line
1 24 jeremybenn
# sh testcase for dmuls.l $rm, $rn -*- Asm -*-
2
# mach: all
3
# as: -isa=shcompact
4
# ld: -m shelf32
5
 
6
        .include "compact/testutils.inc"
7
 
8
        start
9
 
10
        mov #0, r0
11
        mov #0, r1
12
        dmuls.l r0, r1
13
        # check result
14
        sts mach, r3
15
        sts macl, r4
16
        assert r3, #0
17
        assert r4, #0
18
 
19
test2:
20
        mov #0, r0
21
        mov #5, r1
22
        dmuls.l r0, r1
23
        # check result
24
        sts mach, r3
25
        sts macl, r4
26
        assert r3, #0
27
        assert r4, #0
28
 
29
test3:
30
        mov #5, r0
31
        mov #0, r1
32
        dmuls.l r0, r1
33
        # check result
34
        sts mach, r3
35
        sts macl, r4
36
        assert r3, #0
37
        assert r4, #0
38
 
39
test4:
40
        mov #1, r0
41
        mov #5, r1
42
        dmuls.l r0, r1
43
        # check result
44
        sts mach, r3
45
        sts macl, r4
46
        assert r3, #0
47
        assert r4, #5
48
 
49
test5:
50
        mov #5, r0
51
        mov #1, r1
52
        dmuls.l r0, r1
53
        # check result
54
        sts mach, r3
55
        sts macl, r4
56
        assert r3, #0
57
        assert r4, #5
58
 
59
        bra test6
60
        nop
61
 
62
wrong:
63
        fail
64
 
65
test6:
66
        mov #2, r0
67
        mov #2, r1
68
        dmuls.l r0, r1
69
        # check result
70
        sts mach, r3
71
        sts macl, r4
72
        assert r3, #0
73
        assert r4, #4
74
 
75
test7:
76
        mov #1, r0
77
        neg r0, r0
78
        mov #2, r1
79
        dmuls.l r0, r1
80
        # check result
81
        sts mach, r3
82
        sts macl, r4
83
 
84
        mov #0, r8
85
        not r8, r9
86
        not r8, r10
87
        shll r10
88
        cmp/eq r3, r9
89
        bf wrong
90
        cmp/eq r4, r10
91
        bf wrong
92
 
93
test8:
94
        mov #1, r0
95
        neg r0, r0
96
        mov #1, r1
97
        neg r1, r1
98
        dmuls.l r0, r1
99
        # check result
100
        sts mach, r3
101
        sts macl, r4
102
        assert r3, #0
103
        assert r4, #1
104
 
105
test9:
106
        mov #1, r0
107
        neg r0, r0
108
        shlr r0
109
        mov #1, r1
110
        neg r1, r1
111
        shlr r1
112
        dmuls.l r0, r1
113
 
114
okay:
115
        pass

powered by: WebSVN 2.1.0

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