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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.3/] [sim/] [testsuite/] [sim/] [fr30/] [st.cgs] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1181 sfurman
# fr30 testcase for
2
# mach(): fr30
3
#  st $Ri,@$Rj
4
 
5
        .include "testutils.inc"
6
 
7
        START
8
 
9
        .text
10
        .global st
11
st:
12
        mvr_h_gr        sp,r9           ; Save stack pointer
13
        ; Test st $Ri,@Rj
14
        mvi_h_gr        0xdeadbeef,r8
15
        set_cc          0x0f            ; Condition codes should not change
16
        st              r8,@sp
17
        test_cc         1 1 1 1
18
        test_h_mem      0xdeadbeef,sp
19
        test_h_gr       0xdeadbeef,r8
20
 
21
        ; Test st $Ri,@(R13,Rj)
22
        mvi_h_gr        0xbeefdead,r8
23
        mvr_h_gr        sp,r1
24
        inci_h_gr       -8,sp
25
        mvr_h_gr        sp,r2
26
        inci_h_gr       4,sp
27
 
28
        mvi_h_gr        4,r13
29
        set_cc          0x0e            ; Condition codes should not change
30
        st              r8,@(r13,sp)
31
        test_cc         1 1 1 0
32
        test_h_mem      0xbeefdead,r1
33
        test_h_gr       0xbeefdead,r8
34
 
35
        mvi_h_gr        0,r13
36
        set_cc          0x0d            ; Condition codes should not change
37
        st              r8,@(r13,sp)
38
        test_cc         1 1 0 1
39
        test_h_mem      0xbeefdead,sp
40
        test_h_gr       0xbeefdead,r8
41
 
42
        mvi_h_gr        -4,r13
43
        set_cc          0x0c            ; Condition codes should not change
44
        st              r8,@(r13,sp)
45
        test_cc         1 1 0 0
46
        test_h_mem      0xbeefdead,r2
47
        test_h_gr       0xbeefdead,r8
48
 
49
        ; Test st $Ri,@(R14,$disp10)
50
        mvi_h_gr        0xdeadbeef,r8
51
        mvr_h_gr        r9,sp           ; Restore stack pointer
52
        mvr_h_gr        sp,r14
53
        inci_h_gr       -508,r14
54
        mvr_h_gr        r14,r2
55
        inci_h_gr       -512,r14
56
        mvr_h_gr        r14,r3
57
        inci_h_gr       512,r14
58
 
59
        set_cc          0x0b            ; Condition codes should not change
60
        st              r8,@(r14,508)
61
        test_cc         1 0 1 1
62
        test_h_mem      0xdeadbeef,r1
63
        test_h_gr       0xdeadbeef,r8
64
 
65
        set_cc          0x0a            ; Condition codes should not change
66
        st              r8,@(r14,0)
67
        test_cc         1 0 1 0
68
        test_h_mem      0xdeadbeef,r2
69
        test_h_gr       0xdeadbeef,r8
70
 
71
        set_cc          0x09            ; Condition codes should not change
72
        st              r8,@(r14,-512)
73
        test_cc         1 0 0 1
74
        test_h_mem      0xdeadbeef,r3
75
        test_h_gr       0xdeadbeef,r8
76
 
77
        ; Test st $Ri,@(R15,$udisp6)
78
        mvi_h_gr        0xbeefdead,r8
79
        mvr_h_gr        r9,sp           ; Restore stack pointer
80
        inci_h_gr       -60,sp
81
 
82
        set_cc          0x08            ; Condition codes should not change
83
        st              r8,@(r15,60)
84
        test_cc         1 0 0 0
85
        test_h_mem      0xbeefdead,r9
86
        test_h_gr       0xbeefdead,r8
87
 
88
        set_cc          0x07            ; Condition codes should not change
89
        st              r8,@(r15,0)
90
        test_cc         0 1 1 1
91
        test_h_mem      0xbeefdead,r9
92
        test_h_gr       0xbeefdead,r8
93
 
94
        ; Test st $Ri,@-R15
95
        mvr_h_gr        r9,sp           ; Restore stack pointer
96
        mvr_h_gr        r9,r10
97
 
98
        set_cc          0x06            ; Condition codes should not change
99
        st              r15,@-r15
100
        test_cc         0 1 1 0
101
        testr_h_mem     r9,sp           ; original value stored
102
        inci_h_gr       -4,r10
103
        testr_h_gr      r10,sp          ; was decremented
104
 
105
        mvi_h_gr        0xdeadbeef,r8
106
        set_cc          0x05            ; Condition codes should not change
107
        st              r8,@-r15
108
        test_cc         0 1 0 1
109
        test_h_mem      0xdeadbeef,sp
110
        test_h_gr       0xdeadbeef,r8
111
        inci_h_gr       -4,r10
112
        testr_h_gr      r10,sp          ; was decremented
113
 
114
        ; Test st $Rs,@-R15
115
        mvr_h_gr        r9,sp           ; Restore stack pointer
116
        mvr_h_gr        r9,r10
117
        mvi_h_dr        0xbeefdead,tbr
118
        mvi_h_dr        0xdeadbeef,rp
119
        mvi_h_dr        0x0000dead,mdh
120
        mvi_h_dr        0xbeef0000,mdl
121
 
122
        set_cc          0x04            ; Condition codes should not change
123
        st              tbr,@-r15
124
        test_cc         0 1 0 0
125
        test_h_mem      0xbeefdead,sp
126
        inci_h_gr       -4,r10
127
        testr_h_gr      r10,sp          ; was decremented
128
 
129
        set_cc          0x03            ; Condition codes should not change
130
        st              rp,@-r15
131
        test_cc         0 0 1 1
132
        test_h_mem      0xdeadbeef,sp
133
        inci_h_gr       -4,r10
134
        testr_h_gr      r10,sp          ; was decremented
135
 
136
        set_cc          0x02            ; Condition codes should not change
137
        st              mdh,@-r15
138
        test_cc         0 0 1 0
139
        test_h_mem      0x0000dead,sp
140
        inci_h_gr       -4,r10
141
        testr_h_gr      r10,sp          ; was decremented
142
 
143
        set_cc          0x01            ; Condition codes should not change
144
        st              mdl,@-r15
145
        test_cc         0 0 0 1
146
        test_h_mem      0xbeef0000,sp
147
        inci_h_gr       -4,r10
148
        testr_h_gr      r10,sp          ; was decremented
149
 
150
        mvr_h_gr        sp,usp
151
        set_s_user
152
        set_cc          0x00            ; Condition codes should not change
153
        st              ssp,@-r15
154
        test_cc         0 0 0 0
155
        testr_h_mem     r10,sp
156
        inci_h_gr       -4,r10
157
        testr_h_gr      r10,sp          ; was decremented
158
 
159
        set_cc          0x00            ; Condition codes should not change
160
        st              usp,@-r15
161
        test_cc         0 0 0 0
162
        testr_h_mem     r10,sp          ; original value stored
163
        inci_h_gr       -4,r10
164
        testr_h_gr      r10,sp          ; was decremented
165
 
166
        mvr_h_gr        sp,ssp
167
        set_s_system
168
        set_cc          0x00            ; Condition codes should not change
169
        st              usp,@-r15
170
        test_cc         0 0 0 0
171
        testr_h_mem     r10,sp
172
        inci_h_gr       -4,r10
173
        testr_h_gr      r10,sp          ; was decremented
174
 
175
        set_cc          0x00            ; Condition codes should not change
176
        st              ssp,@-r15
177
        test_cc         0 0 0 0
178
        testr_h_mem     r10,sp          ; original value stored
179
        inci_h_gr       -4,r10
180
        testr_h_gr      r10,sp          ; was decremented
181
 
182
        ; Test st $PS,@-R15
183
        mvr_h_gr        r9,sp           ; Restore stack pointer
184
        mvr_h_gr        r9,r10
185
 
186
        set_cc          0x0f            ; Condition codes affect result
187
        set_dbits       3               ; Division bits affect result
188
        st              ps,@-r15
189
        test_cc         1 1 1 1
190
        test_h_mem      0x0000060f,sp
191
        inci_h_gr       -4,r10
192
        testr_h_gr      r10,sp          ; was decremented
193
 
194
        pass

powered by: WebSVN 2.1.0

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