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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gdb-6.8/] [sim/] [testsuite/] [sim/] [fr30/] [ld.cgs] - Blame information for rev 868

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

Line No. Rev Author Line
1 24 jeremybenn
# fr30 testcase for
2
# mach(): fr30
3
# ld $Rj,$Ri
4
# ld @($R13,$Rj),$Ri
5
# ld @($R14,$disp10),$Ri
6
# ld @($R15,$udisp6),$Ri
7
# ld @$R15+,$Ri
8
# ld @$R15+,$Rs
9
 
10
        .include "testutils.inc"
11
 
12
        START
13
 
14
        .text
15
        .global ld
16
ld:
17
        ; Test ld $Rj,$Ri
18
        mvi_h_mem       #0x00000000,sp
19
        set_cc          0x0f            ; condition codes should not change
20
        ld              @sp,r7
21
        test_cc         1 1 1 1
22
        test_h_gr       0,r7
23
 
24
        mvi_h_mem       #0x00000001,sp
25
        set_cc          0x07            ; condition codes should not change
26
        ld              @sp,r7
27
        test_cc         0 1 1 1
28
        test_h_gr       1,r7
29
 
30
        mvi_h_mem       #0x7fffffff,sp
31
        set_cc          0x0b            ; condition codes should not change
32
        ld              @sp,r7
33
        test_cc         1 0 1 1
34
        test_h_gr       0x7fffffff,r7
35
 
36
        mvi_h_mem       #0x80000000,sp
37
        set_cc          0x0d            ; condition codes should not change
38
        ld              @sp,r7
39
        test_cc         1 1 0 1
40
        test_h_gr       0x80000000,r7
41
 
42
        mvi_h_mem       #0xffffffff,sp
43
        set_cc          0x0e            ; condition codes should not change
44
        ld              @sp,r7
45
        test_cc         1 1 1 0
46
        test_h_gr       -1,r7
47
 
48
        ; Test ld @($R13,$Rj),$Ri
49
        mvr_h_gr        sp,r13
50
        inci_h_gr       -8,r13
51
        mvi_h_gr        8,r8
52
 
53
        mvi_h_mem       #0x00000000,sp
54
        set_cc          0x0f            ; condition codes should not change
55
        ld              @(r13,r8),r7
56
        test_cc         1 1 1 1
57
        test_h_gr       0,r7
58
 
59
        mvi_h_mem       #0x00000001,sp
60
        set_cc          0x07            ; condition codes should not change
61
        ld              @(r13,r8),r7
62
        test_cc         0 1 1 1
63
        test_h_gr       1,r7
64
 
65
        mvi_h_mem       #0x7fffffff,sp
66
        set_cc          0x0b            ; condition codes should not change
67
        ld              @(r13,r8),r7
68
        test_cc         1 0 1 1
69
        test_h_gr       0x7fffffff,r7
70
 
71
        mvi_h_mem       #0x80000000,sp
72
        set_cc          0x0d            ; condition codes should not change
73
        ld              @(r13,r8),r7
74
        test_cc         1 1 0 1
75
        test_h_gr       0x80000000,r7
76
 
77
        mvi_h_mem       #0xffffffff,sp
78
        set_cc          0x0e            ; condition codes should not change
79
        ld              @(r13,r8),r7
80
        test_cc         1 1 1 0
81
        test_h_gr       -1,r7
82
 
83
        ; Test ld @($R14,$disp10),$Ri
84
        mvi_h_mem       #0xdeadbeef,sp
85
        mvr_h_gr        sp,r14
86
        mvi_h_gr        -0x1fc,r8
87
        add_h_gr        r8,r14
88
 
89
        set_cc          0x0f            ; condition codes should not change
90
        ld              @(r14,0x1fc),r7
91
        test_cc         1 1 1 1
92
        test_h_gr       0xdeadbeef,r7
93
 
94
        inci_h_gr       0xfc,r14
95
        set_cc          0x07            ; condition codes should not change
96
        ld              @(r14,0x100),r7
97
        test_cc         0 1 1 1
98
        test_h_gr       0xdeadbeef,r7
99
 
100
        inci_h_gr       0x100,r14
101
        set_cc          0x0b            ; condition codes should not change
102
        ld              @(r14,0x0),r7
103
        test_cc         1 0 1 1
104
        test_h_gr       0xdeadbeef,r7
105
 
106
        inci_h_gr       0x100,r14
107
        set_cc          0x0d            ; condition codes should not change
108
        ld              @(r14,-0x100),r7
109
        test_cc         1 1 0 1
110
        test_h_gr       0xdeadbeef,r7
111
 
112
        inci_h_gr       0x100,r14
113
        set_cc          0x0e            ; condition codes should not change
114
        ld              @(r14,-0x200),r7
115
        test_cc         1 1 1 0
116
        test_h_gr       0xdeadbeef,r7
117
 
118
        ; Test ld @($R15,$udisp6),$Ri
119
        mvi_h_mem       #0xdeadbeef,sp
120
        mvr_h_gr        sp,r14
121
        mvi_h_gr        -0x3c,r8
122
        add_h_gr        r8,r14
123
 
124
        set_cc          0x0f            ; condition codes should not change
125
        ld              @(r14,0x3c),r7
126
        test_cc         1 1 1 1
127
        test_h_gr       0xdeadbeef,r7
128
 
129
        inci_h_gr       0x1c,r14
130
        set_cc          0x07            ; condition codes should not change
131
        ld              @(r14,0x20),r7
132
        test_cc         0 1 1 1
133
        test_h_gr       0xdeadbeef,r7
134
 
135
        inci_h_gr       0x20,r14
136
        set_cc          0x0b            ; condition codes should not change
137
        ld              @(r14,0x0),r7
138
        test_cc         1 0 1 1
139
        test_h_gr       0xdeadbeef,r7
140
 
141
        ; Test ld @$R15+,$Ri
142
        mvr_h_gr        sp,r8           ; save original stack pointer
143
        mvr_h_gr        r8,r9
144
        inci_h_gr       4,r9            ; original stack pointer + 4
145
        mvi_h_mem       #0xdeadbeef,sp  ; prime memory
146
 
147
        mvr_h_gr        r8,sp           ; restore original stack pointer
148
        set_cc          0x0f            ; condition codes should not change
149
        ld              @r15+,r7
150
        test_cc         1 1 1 1
151
        test_h_gr       0xdeadbeef,r7
152
        testr_h_gr      sp,r9           ; should have been incremented
153
 
154
        mvr_h_gr        r8,sp           ; restore original stack pointer
155
        set_cc          0x0f            ; condition codes should not change
156
        ld              @r15+,sp
157
        test_cc         1 1 1 1
158
        test_h_gr       0xdeadbeef,sp   ; should not have been incremented
159
 
160
        ; Test ld @$R15+,$Rs
161
        mvr_h_gr        r8,sp           ; restore original stack pointer
162
        set_cc          0x0f            ; condition codes should not change
163
        ld              @r15+,tbr
164
        test_cc         1 1 1 1
165
        test_h_dr       0xdeadbeef,tbr
166
        testr_h_gr      sp,r9           ; should have been incremented
167
 
168
        mvr_h_gr        r8,sp           ; restore original stack pointer
169
        set_cc          0x0f            ; condition codes should not change
170
        ld              @r15+,rp
171
        test_cc         1 1 1 1
172
        test_h_dr       0xdeadbeef,rp
173
        testr_h_gr      sp,r9           ; should have been incremented
174
 
175
        mvr_h_gr        r8,sp           ; restore original stack pointer
176
        set_cc          0x0f            ; condition codes should not change
177
        ld              @r15+,mdh
178
        test_cc         1 1 1 1
179
        test_h_dr       0xdeadbeef,mdh
180
        testr_h_gr      sp,r9           ; should have been incremented
181
 
182
        mvr_h_gr        r8,sp           ; restore original stack pointer
183
        set_cc          0x0f            ; condition codes should not change
184
        ld              @r15+,mdl
185
        test_cc         1 1 1 1
186
        test_h_dr       0xdeadbeef,mdl
187
        testr_h_gr      sp,r9           ; should have been incremented
188
 
189
        set_s_user
190
        mvr_h_gr        r8,sp           ; restore original stack pointer
191
        set_cc          0x0f            ; condition codes should not change
192
        ld              @r15+,ssp
193
        test_cc         1 1 1 1
194
        test_h_dr       0xdeadbeef,ssp
195
        testr_h_gr      sp,r9           ; should have been incremented
196
 
197
        mvr_h_gr        r8,sp           ; restore original stack pointer
198
        set_cc          0x0f            ; condition codes should not change
199
        ld              @r15+,usp
200
        test_cc         1 1 1 1
201
        test_h_dr       0xdeadbeef,usp
202
        test_h_gr       0xdeadbeef,sp   ; should not have been incremented
203
 
204
        set_s_system
205
        mvr_h_gr        r8,sp           ; restore original stack pointer
206
        set_cc          0x0f            ; condition codes should not change
207
        ld              @r15+,usp
208
        test_cc         1 1 1 1
209
        test_h_dr       0xdeadbeef,usp
210
        testr_h_gr      sp,r9           ; should have been incremented
211
 
212
        mvr_h_gr        r8,sp           ; restore original stack pointer
213
        set_cc          0x0f            ; condition codes should not change
214
        ld              @r15+,ssp
215
        test_cc         1 1 1 1
216
        test_h_dr       0xdeadbeef,ssp
217
        test_h_gr       0xdeadbeef,sp   ; should not have been incremented
218
 
219
        pass

powered by: WebSVN 2.1.0

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