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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 24 jeremybenn
# sh testcase for subc $rm, $rn -*- Asm -*-
2
# mach: all
3
# as: -isa=shcompact
4
# ld: -m shelf32
5
 
6
        .include "compact/testutils.inc"
7
 
8
        start
9
zero:
10
        mov #0, r0
11
        mov #0, r1
12
        clrt
13
        subc r0, r1
14
        assert r1, #0
15
 
16
zerot:
17
        mov #0, r0
18
        mov #0, r1
19
        sett
20
        subc r0, r1
21
        # Invert all 1's to all 0's for ease of comparison.
22
        not r1, r1
23
        assert r1, #0
24
 
25
null:
26
        mov #0, r0
27
        mov #10, r1
28
        clrt
29
        subc r0, r1
30
        assert r1, #10
31
 
32
nullt:
33
        mov #0, r0
34
        mov #10, r1
35
        sett
36
        subc r0, r1
37
        assert r1, #9
38
 
39
subc:
40
        mov #10, r0
41
        mov #0, r1
42
        clrt
43
        subc r0, r1
44
        # Again, invert ..
45
        not r1, r1
46
        assert r1, #9
47
 
48
subct:
49
        mov #10, r0
50
        mov #0, r1
51
        sett
52
        subc r0, r1
53
        # Again, invert ..
54
        not r1, r1
55
        assert r1, #10
56
 
57
subc2:
58
        mov #10, r0
59
        mov #20, r1
60
        clrt
61
        subc r0, r1
62
        assert r1, #10
63
 
64
subc2t:
65
        mov #20, r0
66
        mov #10, r1
67
        sett
68
        subc r0, r1
69
        # Again, invert ..
70
        not r1, r1
71
        assert r1, #10
72
 
73
subc3:
74
        mov #5, r0
75
        mov #5, r1
76
        clrt
77
        subc r0, r1
78
        assert r1, #0
79
 
80
subc3t:
81
        mov #5, r0
82
        mov #5, r1
83
        sett
84
        subc r0, r1
85
        # Again, invert ..
86
        not r1, r1
87
        assert r1, #0
88
 
89
large:
90
        mov #2, r0
91
        mov #10, r1
92
        clrt
93
        subc r1, r0
94
        # Again, invert ..
95
        not r0, r0
96
        assert r0, #7
97
 
98
larget:
99
        mov #2, r0
100
        mov #10, r1
101
        sett
102
        subc r0, r1
103
        assert r1, #7
104
 
105
okay:
106
        pass
107
 
108
wrong:
109
        fail

powered by: WebSVN 2.1.0

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