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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [binutils-2.18.50/] [gas/] [testsuite/] [gas/] [mn10200/] [basic.exp] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 38 julius
# Copyright (C) 1996, 2002, 2007 Free Software Foundation, Inc.
2
 
3
# This program is free software; you can redistribute it and/or modify
4
# it under the terms of the GNU General Public License as published by
5
# the Free Software Foundation; either version 3 of the License, or
6
# (at your option) any later version.
7
#
8
# This program is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
# GNU General Public License for more details.
12
#
13
# You should have received a copy of the GNU General Public License
14
# along with this program; if not, write to the Free Software
15
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
16
 
17
# Please email any bugs, comments, and/or additions to this file to:
18
# dejagnu@gnu.org
19
 
20
# Written by Cygnus Support.
21
 
22
proc do_add {} {
23
    set testname "add.s: Add operations"
24
    set x 0
25
 
26
    gas_start "add.s" "-al"
27
 
28
    # Instead of having a variable for each match string just increment the
29
    # total number of matches seen.  That's simpler when testing large numbers
30
    # of instructions (as these tests to).
31
    while 1 {
32
        expect {
33
            -re "^ +\[0-9\]+ 0000 96\[^\n\]*\n" { set x [expr $x+1] }
34
            -re "^ +\[0-9\]+ 0001 F20B\[^\n\]*\n"       { set x [expr $x+1] }
35
            -re "^ +\[0-9\]+ 0003 F2C9\[^\n\]*\n"       { set x [expr $x+1] }
36
            -re "^ +\[0-9\]+ 0005 F24E\[^\n\]*\n"       { set x [expr $x+1] }
37
            -re "^ +\[0-9\]+ 0007 D510\[^\n\]*\n"       { set x [expr $x+1] }
38
            -re "^ +\[0-9\]+ 0009 F71A0001\[^\n\]*\n"   { set x [expr $x+1] }
39
            -re "^ +\[0-9\]+ 000d F463FFFF\[^\n\]*\n"   { set x [expr $x+1] }
40
            -re "^ +8 +01\[^\n\]*\n"                    { set x [expr $x+1] }
41
            -re "^ +\[0-9\]+ 0012 D110\[^\n\]*\n"       { set x [expr $x+1] }
42
            -re "^ +\[0-9\]+ 0014 F70A0001\[^\n\]*\n"   { set x [expr $x+1] }
43
            -re "^ +\[0-9\]+ 0018 F467FFFF\[^\n\]*\n"   { set x [expr $x+1] }
44
            -re "^ +11 +01\[^\n\]*\n"                   { set x [expr $x+1] }
45
            -re "^ +\[0-9\]+ 001d F286\[^\n\]*\n"       { set x [expr $x+1] }
46
            -re "^ +\[0-9\]+ 001f F50E10\[^\n\]*\n"     { set x [expr $x+1] }
47
            -re "\[^\n\]*\n"                            { }
48
            timeout                             { perror "timeout\n"; break }
49
            eof                                 { break }
50
        }
51
    }
52
 
53
    # This was intended to do any cleanup necessary.  It kinda looks like it
54
    # isn't needed, but just in case, please keep it in for now.
55
    gas_finish
56
 
57
    # Did we find what we were looking for?  If not, flunk it.
58
    if [expr $x==14] then { pass $testname } else { fail $testname }
59
}
60
 
61
proc do_bcc {} {
62
    set testname "bcc.s: Bcc tests"
63
    set x 0
64
 
65
    gas_start "bcc.s" "-al"
66
 
67
    # Instead of having a variable for each match string just increment the
68
    # total number of matches seen.  That's simpler when testing large numbers
69
    # of instructions (as these tests to).
70
    while 1 {
71
        expect {
72
            -re "^ +\[0-9\]+ 0000 E800\[^\n\]*\n"       { set x [expr $x+1] }
73
            -re "^ +\[0-9\]+ 0002 E900\[^\n\]*\n"       { set x [expr $x+1] }
74
            -re "^ +\[0-9\]+ 0004 E100\[^\n\]*\n"       { set x [expr $x+1] }
75
            -re "^ +\[0-9\]+ 0006 E200\[^\n\]*\n"       { set x [expr $x+1] }
76
            -re "^ +\[0-9\]+ 0008 E300\[^\n\]*\n"       { set x [expr $x+1] }
77
            -re "^ +\[0-9\]+ 000a E000\[^\n\]*\n"       { set x [expr $x+1] }
78
            -re "^ +\[0-9\]+ 000c E500\[^\n\]*\n"       { set x [expr $x+1] }
79
            -re "^ +\[0-9\]+ 000e E600\[^\n\]*\n"       { set x [expr $x+1] }
80
            -re "^ +\[0-9\]+ 0010 E700\[^\n\]*\n"       { set x [expr $x+1] }
81
            -re "^ +\[0-9\]+ 0012 E400\[^\n\]*\n"       { set x [expr $x+1] }
82
            -re "^ +\[0-9\]+ 0014 F5FC00\[^\n\]*\n"     { set x [expr $x+1] }
83
            -re "^ +\[0-9\]+ 0017 F5FD00\[^\n\]*\n"     { set x [expr $x+1] }
84
            -re "^ +\[0-9\]+ 001a F5FE00\[^\n\]*\n"     { set x [expr $x+1] }
85
            -re "^ +\[0-9\]+ 001d F5FF00\[^\n\]*\n"     { set x [expr $x+1] }
86
            -re "^ +\[0-9\]+ 0020 EA00\[^\n\]*\n"       { set x [expr $x+1] }
87
            -re "\[^\n\]*\n"                            { }
88
            timeout                             { perror "timeout\n"; break }
89
            eof                                 { break }
90
        }
91
    }
92
 
93
    # This was intended to do any cleanup necessary.  It kinda looks like it
94
    # isn't needed, but just in case, please keep it in for now.
95
    gas_finish
96
 
97
    # Did we find what we were looking for?  If not, flunk it.
98
    if [expr $x==15] then { pass $testname } else { fail $testname }
99
}
100
 
101
proc do_bccx {} {
102
    set testname "bccx.s: Bccx tests"
103
    set x 0
104
 
105
    gas_start "bccx.s" "-al"
106
 
107
    # Instead of having a variable for each match string just increment the
108
    # total number of matches seen.  That's simpler when testing large numbers
109
    # of instructions (as these tests to).
110
    while 1 {
111
        expect {
112
            -re "^ +\[0-9\]+ 0000 F5E800\[^\n\]*\n"     { set x [expr $x+1] }
113
            -re "^ +\[0-9\]+ 0003 F5E900\[^\n\]*\n"     { set x [expr $x+1] }
114
            -re "^ +\[0-9\]+ 0006 F5E100\[^\n\]*\n"     { set x [expr $x+1] }
115
            -re "^ +\[0-9\]+ 0009 F5E200\[^\n\]*\n"     { set x [expr $x+1] }
116
            -re "^ +\[0-9\]+ 000c F5E300\[^\n\]*\n"     { set x [expr $x+1] }
117
            -re "^ +\[0-9\]+ 000f F5E000\[^\n\]*\n"     { set x [expr $x+1] }
118
            -re "^ +\[0-9\]+ 0012 F5E500\[^\n\]*\n"     { set x [expr $x+1] }
119
            -re "^ +\[0-9\]+ 0015 F5E600\[^\n\]*\n"     { set x [expr $x+1] }
120
            -re "^ +\[0-9\]+ 0018 F5E700\[^\n\]*\n"     { set x [expr $x+1] }
121
            -re "^ +\[0-9\]+ 001b F5E400\[^\n\]*\n"     { set x [expr $x+1] }
122
            -re "^ +\[0-9\]+ 001e F5EC00\[^\n\]*\n"     { set x [expr $x+1] }
123
            -re "^ +\[0-9\]+ 0021 F5ED00\[^\n\]*\n"     { set x [expr $x+1] }
124
            -re "^ +\[0-9\]+ 0024 F5EE00\[^\n\]*\n"     { set x [expr $x+1] }
125
            -re "^ +\[0-9\]+ 0027 F5EF00\[^\n\]*\n"     { set x [expr $x+1] }
126
            -re "\[^\n\]*\n"                            { }
127
            timeout                             { perror "timeout\n"; break }
128
            eof                                 { break }
129
        }
130
    }
131
 
132
    # This was intended to do any cleanup necessary.  It kinda looks like it
133
    # isn't needed, but just in case, please keep it in for now.
134
    gas_finish
135
 
136
    # Did we find what we were looking for?  If not, flunk it.
137
    if [expr $x==14] then { pass $testname } else { fail $testname }
138
}
139
 
140
proc do_bit {} {
141
    set testname "bit.s: bit tests"
142
    set x 0
143
 
144
    gas_start "bit.s" "-al"
145
 
146
    # Instead of having a variable for each match string just increment the
147
    # total number of matches seen.  That's simpler when testing large numbers
148
    # of instructions (as these tests to).
149
    while 1 {
150
        expect {
151
            -re "^ +\[0-9\]+ 0000 F50540\[^\n\]*\n"     { set x [expr $x+1] }
152
            -re "^ +\[0-9\]+ 0003 F7060020\[^\n\]*\n"   { set x [expr $x+1] }
153
            -re "^ +\[0-9\]+ 0007 F029\[^\n\]*\n"       { set x [expr $x+1] }
154
            -re "^ +\[0-9\]+ 0009 F039\[^\n\]*\n"       { set x [expr $x+1] }
155
            -re "^ +12 +FFFF40\[^\n\]*\n"               { set x [expr $x+1] }
156
            -re "\[^\n\]*\n"                            { }
157
            timeout                             { perror "timeout\n"; break }
158
            eof                                 { break }
159
        }
160
    }
161
 
162
    # This was intended to do any cleanup necessary.  It kinda looks like it
163
    # isn't needed, but just in case, please keep it in for now.
164
    gas_finish
165
 
166
    # Did we find what we were looking for?  If not, flunk it.
167
    if [expr $x==4] then { pass $testname } else { fail $testname }
168
}
169
 
170
 
171
proc do_cmp {} {
172
    set testname "cmp.s: cmp tests"
173
    set x 0
174
 
175
    gas_start "cmp.s" "-al"
176
 
177
    # Instead of having a variable for each match string just increment the
178
    # total number of matches seen.  That's simpler when testing large numbers
179
    # of instructions (as these tests to).
180
    while 1 {
181
        expect {
182
            -re "^ +\[0-9\]+ 0000 F396\[^\n\]*\n"       { set x [expr $x+1] }
183
            -re "^ +\[0-9\]+ 0002 F22B\[^\n\]*\n"       { set x [expr $x+1] }
184
            -re "^ +\[0-9\]+ 0004 F2EF\[^\n\]*\n"       { set x [expr $x+1] }
185
            -re "^ +\[0-9\]+ 0006 F26E\[^\n\]*\n"       { set x [expr $x+1] }
186
            -re "^ +\[0-9\]+ 0008 DB10\[^\n\]*\n"       { set x [expr $x+1] }
187
            -re "^ +\[0-9\]+ 000a F74A0001\[^\n\]*\n"   { set x [expr $x+1] }
188
            -re "^ +\[0-9\]+ 000e F479FFFF\[^\n\]*\n"   { set x [expr $x+1] }
189
            -re "^ +8 +01\[^\n\]*\n"                    { set x [expr $x+1] }
190
            -re "^ +\[0-9\]+ 0013 EE0001\[^\n\]*\n"     { set x [expr $x+1] }
191
            -re "^ +\[0-9\]+ 0016 F47DFFFF\[^\n\]*\n"   { set x [expr $x+1] }
192
            -re "^ +10 +01\[^\n\]*\n"                   { set x [expr $x+1] }
193
            -re "\[^\n\]*\n"                            { }
194
            timeout                             { perror "timeout\n"; break }
195
            eof                                 { break }
196
        }
197
    }
198
 
199
    # This was intended to do any cleanup necessary.  It kinda looks like it
200
    # isn't needed, but just in case, please keep it in for now.
201
    gas_finish
202
 
203
    # Did we find what we were looking for?  If not, flunk it.
204
    if [expr $x==11] then { pass $testname } else { fail $testname }
205
}
206
 
207
proc do_ext {} {
208
    set testname "ext.s: ext tests"
209
    set x 0
210
 
211
    gas_start "ext.s" "-al"
212
 
213
    # Instead of having a variable for each match string just increment the
214
    # total number of matches seen.  That's simpler when testing large numbers
215
    # of instructions (as these tests to).
216
    while 1 {
217
        expect {
218
            -re "^ +\[0-9\]+ 0000 F3C5\[^\n\]*\n"       { set x [expr $x+1] }
219
            -re "^ +\[0-9\]+ 0002 B2\[^\n\]*\n"         { set x [expr $x+1] }
220
            -re "^ +\[0-9\]+ 0003 B7\[^\n\]*\n"         { set x [expr $x+1] }
221
            -re "^ +\[0-9\]+ 0004 BA\[^\n\]*\n"         { set x [expr $x+1] }
222
            -re "^ +\[0-9\]+ 0005 BD\[^\n\]*\n"         { set x [expr $x+1] }
223
            -re "\[^\n\]*\n"                            { }
224
            timeout                             { perror "timeout\n"; break }
225
            eof                                 { break }
226
        }
227
    }
228
 
229
    # This was intended to do any cleanup necessary.  It kinda looks like it
230
    # isn't needed, but just in case, please keep it in for now.
231
    gas_finish
232
 
233
    # Did we find what we were looking for?  If not, flunk it.
234
    if [expr $x==5] then { pass $testname } else { fail $testname }
235
}
236
 
237
proc do_extend {} {
238
    set testname "extend.s: extended instruction tests"
239
    set x 0
240
 
241
    gas_start "extend.s" "-al"
242
 
243
    # Instead of having a variable for each match string just increment the
244
    # total number of matches seen.  That's simpler when testing large numbers
245
    # of instructions (as these tests to).
246
    while 1 {
247
        expect {
248
            -re "^ +\[0-9\]+ 0000 F505\[^\n\]*\n"       { set x [expr $x+1] }
249
            -re "^ +\[0-9\]+ 0002 F6FA\[^\n\]*\n"       { set x [expr $x+1] }
250
            -re "^ +\[0-9\]+ 0004 F606\[^\n\]*\n"       { set x [expr $x+1] }
251
            -re "^ +\[0-9\]+ 0006 F90210\[^\n\]*\n"     { set x [expr $x+1] }
252
            -re "^ +\[0-9\]+ 0009 FB030100\[^\n\]*\n"   { set x [expr $x+1] }
253
            -re "^ +\[0-9\]+ 000d FD030001\[^\n\]*\n"   { set x [expr $x+1] }
254
            -re "^ +7 +FFFF\[^\n\]*\n"                  { set x [expr $x+1] }
255
            -re "^ +\[0-9\]+ 0013 F616\[^\n\]*\n"       { set x [expr $x+1] }
256
            -re "^ +\[0-9\]+ 0015 F91610\[^\n\]*\n"     { set x [expr $x+1] }
257
            -re "^ +\[0-9\]+ 0018 FB170100\[^\n\]*\n"   { set x [expr $x+1] }
258
            -re "^ +\[0-9\]+ 001c FD170001\[^\n\]*\n"   { set x [expr $x+1] }
259
            -re "^ +11 +FFFF\[^\n\]*\n"                 { set x [expr $x+1] }
260
            -re "^ +\[0-9\]+ 0022 F64B\[^\n\]*\n"       { set x [expr $x+1] }
261
            -re "^ +\[0-9\]+ 0024 F65E\[^\n\]*\n"       { set x [expr $x+1] }
262
            -re "^ +\[0-9\]+ 0026 F676\[^\n\]*\n"       { set x [expr $x+1] }
263
            -re "\[^\n\]*\n"                            { }
264
            timeout                             { perror "timeout\n"; break }
265
            eof                                 { break }
266
        }
267
    }
268
 
269
    # This was intended to do any cleanup necessary.  It kinda looks like it
270
    # isn't needed, but just in case, please keep it in for now.
271
    gas_finish
272
 
273
    # Did we find what we were looking for?  If not, flunk it.
274
    if [expr $x==15] then { pass $testname } else { fail $testname }
275
}
276
 
277
proc do_logical {} {
278
    set testname "logical.s: logical tests"
279
    set x 0
280
 
281
    gas_start "logical.s" "-al"
282
 
283
    # Instead of having a variable for each match string just increment the
284
    # total number of matches seen.  That's simpler when testing large numbers
285
    # of instructions (as these tests to).
286
    while 1 {
287
        expect {
288
            -re "^ +\[0-9\]+ 0000 F306\[^\n\]*\n"       { set x [expr $x+1] }
289
            -re "^ +\[0-9\]+ 0002 F5027F\[^\n\]*\n"     { set x [expr $x+1] }
290
            -re "^ +\[0-9\]+ 0005 F703FF7F\[^\n\]*\n"   { set x [expr $x+1] }
291
            -re "^ +\[0-9\]+ 0009 F710FF7F\[^\n\]*\n"   { set x [expr $x+1] }
292
            -re "^ +\[0-9\]+ 000d F316\[^\n\]*\n"       { set x [expr $x+1] }
293
            -re "^ +\[0-9\]+ 000f F50A7F\[^\n\]*\n"     { set x [expr $x+1] }
294
            -re "^ +\[0-9\]+ 0012 F743FF7F\[^\n\]*\n"   { set x [expr $x+1] }
295
            -re "^ +\[0-9\]+ 0016 F714FF7F\[^\n\]*\n"   { set x [expr $x+1] }
296
            -re "^ +\[0-9\]+ 001a F326\[^\n\]*\n"       { set x [expr $x+1] }
297
            -re "^ +\[0-9\]+ 001c F74FFF7F\[^\n\]*\n"   { set x [expr $x+1] }
298
            -re "^ +\[0-9\]+ 0020 F3E7\[^\n\]*\n"       { set x [expr $x+1] }
299
            -re "^\[^\n\]*\n"                           { }
300
            timeout                             { perror "timeout\n"; break }
301
            eof                                 { break }
302
        }
303
    }
304
 
305
    # This was intended to do any cleanup necessary.  It kinda looks like it
306
    # isn't needed, but just in case, please keep it in for now.
307
    gas_finish
308
 
309
    # Did we find what we were looking for?  If not, flunk it.
310
    if [expr $x==11] then { pass $testname } else { fail $testname }
311
}
312
 
313
proc do_loop {} {
314
    set testname "loop.s: loop tests"
315
    set x 0
316
 
317
    gas_start "loop.s" "-al"
318
 
319
    # Instead of having a variable for each match string just increment the
320
    # total number of matches seen.  That's simpler when testing large numbers
321
    # of instructions (as these tests to).
322
    while 1 {
323
        expect {
324
            -re "^ +\[0-9\]+ 0000 D8\[^\n\]*\n"         { set x [expr $x+1] }
325
            -re "^ +\[0-9\]+ 0001 D9\[^\n\]*\n"         { set x [expr $x+1] }
326
            -re "^ +\[0-9\]+ 0002 D1\[^\n\]*\n"         { set x [expr $x+1] }
327
            -re "^ +\[0-9\]+ 0003 D2\[^\n\]*\n"         { set x [expr $x+1] }
328
            -re "^ +\[0-9\]+ 0004 D3\[^\n\]*\n"         { set x [expr $x+1] }
329
            -re "^ +\[0-9\]+ 0005 D0\[^\n\]*\n"         { set x [expr $x+1] }
330
            -re "^ +\[0-9\]+ 0006 D5\[^\n\]*\n"         { set x [expr $x+1] }
331
            -re "^ +\[0-9\]+ 0007 D6\[^\n\]*\n"         { set x [expr $x+1] }
332
            -re "^ +\[0-9\]+ 0008 D7\[^\n\]*\n"         { set x [expr $x+1] }
333
            -re "^ +\[0-9\]+ 0009 D4\[^\n\]*\n"         { set x [expr $x+1] }
334
            -re "^ +\[0-9\]+ 000a DA\[^\n\]*\n"         { set x [expr $x+1] }
335
            -re "^ +\[0-9\]+ 000b DB\[^\n\]*\n"         { set x [expr $x+1] }
336
            -re "\[^\n\]*\n"                            { }
337
            timeout                             { perror "timeout\n"; break }
338
            eof                                 { break }
339
        }
340
    }
341
 
342
    # This was intended to do any cleanup necessary.  It kinda looks like it
343
    # isn't needed, but just in case, please keep it in for now.
344
    gas_finish
345
 
346
    # Did we find what we were looking for?  If not, flunk it.
347
    if [expr $x==12] then { pass $testname } else { fail $testname }
348
}
349
 
350
proc do_mov1 {} {
351
    set testname "mov1.s: mov1 tests"
352
    set x 0
353
 
354
    gas_start "mov1.s" "-al"
355
 
356
    # Instead of having a variable for each match string just increment the
357
    # total number of matches seen.  That's simpler when testing large numbers
358
    # of instructions (as these tests to).
359
    while 1 {
360
        expect {
361
            -re "^ +\[0-9\]+ 0000 F236\[^\n\]*\n"       { set x [expr $x+1] }
362
            -re "^ +\[0-9\]+ 0002 F2F9\[^\n\]*\n"       { set x [expr $x+1] }
363
            -re "^ +\[0-9\]+ 0004 86\[^\n\]*\n"         { set x [expr $x+1] }
364
            -re "^ +\[0-9\]+ 0005 F279\[^\n\]*\n"       { set x [expr $x+1] }
365
            -re "^ +\[0-9\]+ 0007 F3F3\[^\n\]*\n"       { set x [expr $x+1] }
366
            -re "^ +\[0-9\]+ 0009 F3D8\[^\n\]*\n"       { set x [expr $x+1] }
367
            -re "^ +\[0-9\]+ 000b F3E1\[^\n\]*\n"       { set x [expr $x+1] }
368
            -re "^ +\[0-9\]+ 000d F3C8\[^\n\]*\n"       { set x [expr $x+1] }
369
            -re "^ +\[0-9\]+ 000f 29\[^\n\]*\n"         { set x [expr $x+1] }
370
            -re "^ +\[0-9\]+ 0010 6908\[^\n\]*\n"       { set x [expr $x+1] }
371
            -re "^ +\[0-9\]+ 0012 F7C90001\[^\n\]*\n"   { set x [expr $x+1] }
372
            -re "^ +\[0-9\]+ 0016 F489FFFF\[^\n\]*\n"   { set x [expr $x+1] }
373
            -re "^ +13 +01\[^\n\]*\n"                   { set x [expr $x+1] }
374
            -re "\[^\n\]*\n"                            { }
375
            timeout                             { perror "timeout\n"; break }
376
            eof                                 { break }
377
        }
378
    }
379
 
380
    # This was intended to do any cleanup necessary.  It kinda looks like it
381
    # isn't needed, but just in case, please keep it in for now.
382
    gas_finish
383
 
384
    # Did we find what we were looking for?  If not, flunk it.
385
    if [expr $x==13] then { pass $testname } else { fail $testname }
386
}
387
 
388
proc do_mov2 {} {
389
    set testname "mov2.s: mov2 tests"
390
    set x 0
391
 
392
    gas_start "mov2.s" "-al"
393
 
394
    # Instead of having a variable for each match string just increment the
395
    # total number of matches seen.  That's simpler when testing large numbers
396
    # of instructions (as these tests to).
397
    while 1 {
398
        expect {
399
            -re "^ +\[0-9\]+ 0000 F156\[^\n\]*\n"       { set x [expr $x+1] }
400
            -re "^ +\[0-9\]+ 0002 C90080\[^\n\]*\n"     { set x [expr $x+1] }
401
            -re "^ +\[0-9\]+ 0005 F4C1FFFF\[^\n\]*\n"   { set x [expr $x+1] }
402
            -re "^ +4 +01\[^\n\]*\n"                    { set x [expr $x+1] }
403
            -re "^ +\[0-9\]+ 000a 7908\[^\n\]*\n"       { set x [expr $x+1] }
404
            -re "^ +\[0-9\]+ 000c F7B90001\[^\n\]*\n"   { set x [expr $x+1] }
405
            -re "^ +\[0-9\]+ 0010 F4F9FFFF \[^\n\]*\n"  { set x [expr $x+1] }
406
            -re "^ +7 +01\[^\n\]*\n"                    { set x [expr $x+1] }
407
            -re "^ +\[0-9\]+ 0015 F116\[^\n\]*\n"       { set x [expr $x+1] }
408
            -re "^ +\[0-9\]+ 0017 F7310080\[^\n\]*\n"   { set x [expr $x+1] }
409
            -re "^ +\[0-9\]+ 001b F4D1FFFF\[^\n\]*\n"   { set x [expr $x+1] }
410
            -re "^ +10 +01\[^\n\]*\n"                   { set x [expr $x+1] }
411
            -re "\[^\n\]*\n"                            { }
412
            timeout                             { perror "timeout\n"; break }
413
            eof                                 { break }
414
        }
415
    }
416
 
417
    # This was intended to do any cleanup necessary.  It kinda looks like it
418
    # isn't needed, but just in case, please keep it in for now.
419
    gas_finish
420
 
421
    # Did we find what we were looking for?  If not, flunk it.
422
    if [expr $x==12] then { pass $testname } else { fail $testname }
423
}
424
 
425
proc do_mov3 {} {
426
    set testname "mov3.s: mov3 tests"
427
    set x 0
428
 
429
    gas_start "mov3.s" "-al"
430
 
431
    # Instead of having a variable for each match string just increment the
432
    # total number of matches seen.  That's simpler when testing large numbers
433
    # of instructions (as these tests to).
434
    while 1 {
435
        expect {
436
            -re "^ +\[0-9\]+ 0000 09\[^\n\]*\n" { set x [expr $x+1] }
437
            -re "^ +\[0-9\]+ 0001 4920\[^\n\]*\n"       { set x [expr $x+1] }
438
            -re "^ +\[0-9\]+ 0003 F7890001\[^\n\]*\n"   { set x [expr $x+1] }
439
            -re "^ +\[0-9\]+ 0007 F409FFFF\[^\n\]*\n"   { set x [expr $x+1] }
440
            -re "^ +5 +01\[^\n\]*\n"                    { set x [expr $x+1] }
441
            -re "^ +\[0-9\]+ 000c F1E9\[^\n\]*\n"       { set x [expr $x+1] }
442
            -re "^ +\[0-9\]+ 000e C18000\[^\n\]*\n"     { set x [expr $x+1] }
443
            -re "^ +\[0-9\]+ 0011 F441FFFF\[^\n\]*\n"   { set x [expr $x+1] }
444
            -re "^ +8 +01\[^\n\]*\n"                    { set x [expr $x+1] }
445
            -re "^ +\[0-9\]+ 0016 5920\[^\n\]*\n"       { set x [expr $x+1] }
446
            -re "^ +\[0-9\]+ 0018 F7A90001\[^\n\]*\n"   { set x [expr $x+1] }
447
            -re "^ +\[0-9\]+ 001c F419FFFF\[^\n\]*\n"   { set x [expr $x+1] }
448
            -re "^ +11 +01\[^\n\]*\n"                   { set x [expr $x+1] }
449
            -re "\[^\n\]*\n"                            { }
450
            timeout                             { perror "timeout\n"; break }
451
            eof                                 { break }
452
        }
453
    }
454
 
455
    # This was intended to do any cleanup necessary.  It kinda looks like it
456
    # isn't needed, but just in case, please keep it in for now.
457
    gas_finish
458
 
459
    # Did we find what we were looking for?  If not, flunk it.
460
    if [expr $x==13] then { pass $testname } else { fail $testname }
461
}
462
 
463
proc do_mov4 {} {
464
    set testname "mov4.s: mov4 tests"
465
    set x 0
466
 
467
    gas_start "mov4.s" "-al"
468
 
469
    # Instead of having a variable for each match string just increment the
470
    # total number of matches seen.  That's simpler when testing large numbers
471
    # of instructions (as these tests to).
472
    while 1 {
473
        expect {
474
            -re "^ +\[0-9\]+ 0000 F1A9\[^\n\]*\n"       { set x [expr $x+1] }
475
            -re "^ +\[0-9\]+ 0002 F7218000\[^\n\]*\n"   { set x [expr $x+1] }
476
            -re "^ +\[0-9\]+ 0006 F451FFFF\[^\n\]*\n"   { set x [expr $x+1] }
477
            -re "^ +4 +01\[^\n\]*\n"                    { set x [expr $x+1] }
478
            -re "^ +\[0-9\]+ 000b 8508\[^\n\]*\n"       { set x [expr $x+1] }
479
            -re "^ +\[0-9\]+ 000d F90001\[^\n\]*\n"     { set x [expr $x+1] }
480
            -re "^ +\[0-9\]+ 0010 F471FFFF\[^\n\]*\n"   { set x [expr $x+1] }
481
            -re "^ +7 +01\[^\n\]*\n"                    { set x [expr $x+1] }
482
            -re "^ +\[0-9\]+ 0015 DD0001\[^\n\]*\n"     { set x [expr $x+1] }
483
            -re "^ +\[0-9\]+ 0018 F475FFFF\[^\n\]*\n"   { set x [expr $x+1] }
484
            -re "^ +9 +01\[^\n\]*\n"                    { set x [expr $x+1] }
485
            -re "\[^\n\]*\n"                            { }
486
            timeout                             { perror "timeout\n"; break }
487
            eof                                 { break }
488
        }
489
    }
490
 
491
    # This was intended to do any cleanup necessary.  It kinda looks like it
492
    # isn't needed, but just in case, please keep it in for now.
493
    gas_finish
494
 
495
    # Did we find what we were looking for?  If not, flunk it.
496
    if [expr $x==11] then { pass $testname } else { fail $testname }
497
}
498
 
499
proc do_movx {} {
500
    set testname "movx.s: movx tests"
501
    set x 0
502
 
503
    gas_start "movx.s" "-al"
504
 
505
    # Instead of having a variable for each match string just increment the
506
    # total number of matches seen.  That's simpler when testing large numbers
507
    # of instructions (as these tests to).
508
    while 1 {
509
        expect {
510
            -re "^ +\[0-9\]+ 0000 F57908\[^\n\]*\n"     { set x [expr $x+1] }
511
            -re "^ +\[0-9\]+ 0003 F7790001\[^\n\]*\n"   { set x [expr $x+1] }
512
            -re "^ +\[0-9\]+ 0007 F4B9FFFF\[^\n\]*\n"   { set x [expr $x+1] }
513
            -re "^ +4 +01\[^\n\]*\n"                    { set x [expr $x+1] }
514
            -re "^ +\[0-9\]+ 000c F55908\[^\n\]*\n"     { set x [expr $x+1] }
515
            -re "^ +\[0-9\]+ 000f F7690001\[^\n\]*\n"   { set x [expr $x+1] }
516
            -re "^ +\[0-9\]+ 0013 F439FFFF\[^\n\]*\n"   { set x [expr $x+1] }
517
            -re "^ +7 +01\[^\n\]*\n"                    { set x [expr $x+1] }
518
            -re "\[^\n\]*\n"                            { }
519
            timeout                             { perror "timeout\n"; break }
520
            eof                                 { break }
521
        }
522
    }
523
 
524
    # This was intended to do any cleanup necessary.  It kinda looks like it
525
    # isn't needed, but just in case, please keep it in for now.
526
    gas_finish
527
 
528
    # Did we find what we were looking for?  If not, flunk it.
529
    if [expr $x==8] then { pass $testname } else { fail $testname }
530
}
531
 
532
proc do_movb {} {
533
    set testname "movb.s: movb tests"
534
    set x 0
535
 
536
    gas_start "movb.s" "-al"
537
 
538
    # Instead of having a variable for each match string just increment the
539
    # total number of matches seen.  That's simpler when testing large numbers
540
    # of instructions (as these tests to).
541
    while 1 {
542
        expect {
543
            -re "^ +\[0-9\]+ 0000 F52908\[^\n\]*\n"     { set x [expr $x+1] }
544
            -re "^ +\[0-9\]+ 0003 F7D90001\[^\n\]*\n"   { set x [expr $x+1] }
545
            -re "^ +\[0-9\]+ 0007 F4A9FFFF\[^\n\]*\n"   { set x [expr $x+1] }
546
            -re "^ +4 +01\[^\n\]*\n"                    { set x [expr $x+1] }
547
            -re "^ +\[0-9\]+ 000c F06B\[^\n\]*\n"       { set x [expr $x+1] }
548
            -re "^ +\[0-9\]+ 000e F4C6FFFF\[^\n\]*\n"   { set x [expr $x+1] }
549
            -re "^ +6 +01\[^\n\]*\n"                    { set x [expr $x+1] }
550
            -re "^ +\[0-9\]+ 0013 19\[^\n\]*\n" { set x [expr $x+1] }
551
            -re "^ +\[0-9\]+ 0014 F51908\[^\n\]*\n"     { set x [expr $x+1] }
552
            -re "^ +\[0-9\]+ 0017 F7990001\[^\n\]*\n"   { set x [expr $x+1] }
553
            -re "^ +\[0-9\]+ 001b F429FFFF\[^\n\]*\n"   { set x [expr $x+1] }
554
            -re "^ +10 +01\[^\n\]*\n"                   { set x [expr $x+1] }
555
            -re "^ +\[0-9\]+ 0020 F0E9\[^\n\]*\n"       { set x [expr $x+1] }
556
            -re "^ +\[0-9\]+ 0022 C50001\[^\n\]*\n"     { set x [expr $x+1] }
557
            -re "^ +\[0-9\]+ 0025 F445FFFF\[^\n\]*\n"   { set x [expr $x+1] }
558
            -re "^ +13 +01\[^\n\]*\n"                   { set x [expr $x+1] }
559
            -re "\[^\n\]*\n"                            { }
560
            timeout                             { perror "timeout\n"; break }
561
            eof                                 { break }
562
        }
563
    }
564
 
565
    # This was intended to do any cleanup necessary.  It kinda looks like it
566
    # isn't needed, but just in case, please keep it in for now.
567
    gas_finish
568
 
569
    # Did we find what we were looking for?  If not, flunk it.
570
    if [expr $x==16] then { pass $testname } else { fail $testname }
571
}
572
 
573
proc do_movbu {} {
574
    set testname "movbu.s: movbu tests"
575
    set x 0
576
 
577
    gas_start "movbu.s" "-al"
578
 
579
    # Instead of having a variable for each match string just increment the
580
    # total number of matches seen.  That's simpler when testing large numbers
581
    # of instructions (as these tests to).
582
    while 1 {
583
        expect {
584
            -re "^ +\[0-9\]+ 0000 39\[^\n\]*\n" { set x [expr $x+1] }
585
            -re "^ +\[0-9\]+ 0001 F53908\[^\n\]*\n"     { set x [expr $x+1] }
586
            -re "^ +\[0-9\]+ 0004 F7590001\[^\n\]*\n"   { set x [expr $x+1] }
587
            -re "^ +\[0-9\]+ 0008 F499FFFF\[^\n\]*\n"   { set x [expr $x+1] }
588
            -re "^ +5 +01\[^\n\]*\n"                    { set x [expr $x+1] }
589
            -re "^ +\[0-9\]+ 000d F096\[^\n\]*\n"       { set x [expr $x+1] }
590
            -re "^ +\[0-9\]+ 000f CD0080\[^\n\]*\n"     { set x [expr $x+1] }
591
            -re "^ +\[0-9\]+ 0012 F4C9FFFF\[^\n\]*\n"   { set x [expr $x+1] }
592
            -re "^ +8 +01\[^\n\]*\n"                    { set x [expr $x+1] }
593
            -re "\[^\n\]*\n"                            { }
594
            timeout                             { perror "timeout\n"; break }
595
            eof                                 { break }
596
        }
597
    }
598
 
599
    # This was intended to do any cleanup necessary.  It kinda looks like it
600
    # isn't needed, but just in case, please keep it in for now.
601
    gas_finish
602
 
603
    # Did we find what we were looking for?  If not, flunk it.
604
    if [expr $x==9] then { pass $testname } else { fail $testname }
605
}
606
 
607
proc do_movhu {} {
608
    set testname "movhu.s: movhu tests"
609
    set x 0
610
 
611
    gas_start "movhu.s" "-al"
612
 
613
    # Instead of having a variable for each match string just increment the
614
    # total number of matches seen.  That's simpler when testing large numbers
615
    # of instructions (as these tests to).
616
    while 1 {
617
        expect {
618
            -re "^ +\[0-9\]+ 0000 F066\[^\n\]*\n"       { set x [expr $x+1] }
619
            -re "^ +\[0-9\]+ 0002 F86608\[^\n\]*\n"     { set x [expr $x+1] }
620
            -re "^ +\[0-9\]+ 0005 FA660100\[^\n\]*\n"   { set x [expr $x+1] }
621
            -re "^ +\[0-9\]+ 0009 FC660001\[^\n\]*\n"   { set x [expr $x+1] }
622
            -re "^ +5 +FFFF\[^\n\]*\n"                  { set x [expr $x+1] }
623
            -re "^ +\[0-9\]+ 000f F8BD08\[^\n\]*\n"     { set x [expr $x+1] }
624
            -re "^ +\[0-9\]+ 0012 FABD0100\[^\n\]*\n"   { set x [expr $x+1] }
625
            -re "^ +\[0-9\]+ 0016 FCBD0001\[^\n\]*\n"   { set x [expr $x+1] }
626
            -re "^ +8 +FFFF\[^\n\]*\n"                  { set x [expr $x+1] }
627
            -re "^ +\[0-9\]+ 001c F4A5\[^\n\]*\n"       { set x [expr $x+1] }
628
            -re "^ +\[0-9\]+ 001e 398000\[^\n\]*\n"     { set x [expr $x+1] }
629
            -re "^ +\[0-9\]+ 0021 FCAD0001\[^\n\]*\n"   { set x [expr $x+1] }
630
            -re "^ +11 +FFFF\[^\n\]*\n"                 { set x [expr $x+1] }
631
            -re "^ +\[0-9\]+ 0027 F076\[^\n\]*\n"       { set x [expr $x+1] }
632
            -re "^ +\[0-9\]+ 0029 F87620\[^\n\]*\n"     { set x [expr $x+1] }
633
            -re "^ +\[0-9\]+ 002c FA760100\[^\n\]*\n"   { set x [expr $x+1] }
634
            -re "^ +\[0-9\]+ 0030 FC760001\[^\n\]*\n"   { set x [expr $x+1] }
635
            -re "^ +15 +FFFF\[^\n\]*\n"                 { set x [expr $x+1] }
636
            -re "^ +\[0-9\]+ 0036 F89720\[^\n\]*\n"     { set x [expr $x+1] }
637
            -re "^ +\[0-9\]+ 0039 FA978000\[^\n\]*\n"   { set x [expr $x+1] }
638
            -re "^ +\[0-9\]+ 003d FC970001\[^\n\]*\n"   { set x [expr $x+1] }
639
            -re "^ +18 +FFFF\[^\n\]*\n"                 { set x [expr $x+1] }
640
            -re "^ +\[0-9\]+ 0043 F4DA\[^\n\]*\n"       { set x [expr $x+1] }
641
            -re "^ +\[0-9\]+ 0045 070080\[^\n\]*\n"     { set x [expr $x+1] }
642
            -re "^ +\[0-9\]+ 0048 FC870001\[^\n\]*\n"   { set x [expr $x+1] }
643
            -re "^ +21 +FFFF\[^\n\]*\n"                 { set x [expr $x+1] }
644
            -re "\[^\n\]*\n"                            { }
645
            timeout                             { perror "timeout\n"; break }
646
            eof                                 { break }
647
        }
648
    }
649
 
650
    # This was intended to do any cleanup necessary.  It kinda looks like it
651
    # isn't needed, but just in case, please keep it in for now.
652
    gas_finish
653
 
654
    # Did we find what we were looking for?  If not, flunk it.
655
    if [expr $x==26] then { pass $testname } else { fail $testname }
656
}
657
 
658
proc do_movm {} {
659
    set testname "movm.s: movm tests"
660
    set x 0
661
 
662
    gas_start "movm.s" "-al"
663
 
664
    # Instead of having a variable for each match string just increment the
665
    # total number of matches seen.  That's simpler when testing large numbers
666
    # of instructions (as these tests to).
667
    while 1 {
668
        expect {
669
            -re "^ +\[0-9\]+ 0000 CE30\[^\n\]*\n"       { set x [expr $x+1] }
670
            -re "^ +\[0-9\]+ 0002 CEF8\[^\n\]*\n"       { set x [expr $x+1] }
671
            -re "^ +\[0-9\]+ 0004 CF30\[^\n\]*\n"       { set x [expr $x+1] }
672
            -re "^ +\[0-9\]+ 0006 CFF8\[^\n\]*\n"       { set x [expr $x+1] }
673
            -re "\[^\n\]*\n"                            { }
674
            timeout                             { perror "timeout\n"; break }
675
            eof                                 { break }
676
        }
677
    }
678
 
679
    # This was intended to do any cleanup necessary.  It kinda looks like it
680
    # isn't needed, but just in case, please keep it in for now.
681
    gas_finish
682
 
683
    # Did we find what we were looking for?  If not, flunk it.
684
    if [expr $x==4] then { pass $testname } else { fail $testname }
685
}
686
 
687
proc do_muldiv {} {
688
    set testname "muldiv.s: muldiv tests"
689
    set x 0
690
 
691
    gas_start "muldiv.s" "-al"
692
 
693
    # Instead of having a variable for each match string just increment the
694
    # total number of matches seen.  That's simpler when testing large numbers
695
    # of instructions (as these tests to).
696
    while 1 {
697
        expect {
698
            -re "^ +\[0-9\]+ 0000 F346\[^\n\]*\n"       { set x [expr $x+1] }
699
            -re "^ +\[0-9\]+ 0002 F35B\[^\n\]*\n"       { set x [expr $x+1] }
700
            -re "^ +\[0-9\]+ 0004 F36E\[^\n\]*\n"       { set x [expr $x+1] }
701
            -re "\[^\n\]*\n"                            { }
702
            timeout                             { perror "timeout\n"; break }
703
            eof                                 { break }
704
        }
705
    }
706
 
707
    # This was intended to do any cleanup necessary.  It kinda looks like it
708
    # isn't needed, but just in case, please keep it in for now.
709
    gas_finish
710
 
711
    # Did we find what we were looking for?  If not, flunk it.
712
    if [expr $x==3] then { pass $testname } else { fail $testname }
713
}
714
 
715
proc do_other {} {
716
    set testname "other.s: other tests"
717
    set x 0
718
 
719
    gas_start "other.s" "-al"
720
 
721
    # Instead of having a variable for each match string just increment the
722
    # total number of matches seen.  That's simpler when testing large numbers
723
    # of instructions (as these tests to).
724
    while 1 {
725
        expect {
726
            -re "^ +\[0-9\]+ 0000 FC0001\[^\n\]*\n"     { set x [expr $x+1] }
727
            -re "^ +\[0-9\]+ 0003 F4E0FFFF\[^\n\]*\n"   { set x [expr $x+1] }
728
            -re "^ +3 +01\[^\n\]*\n"                    { set x [expr $x+1] }
729
            -re "^ +\[0-9\]+ 0008 F008\[^\n\]*\n"       { set x [expr $x+1] }
730
            -re "^ +\[0-9\]+ 000a FD0001\[^\n\]*\n"     { set x [expr $x+1] }
731
            -re "^ +\[0-9\]+ 000d F4E1FFFF\[^\n\]*\n"   { set x [expr $x+1] }
732
            -re "^ +6 +01\[^\n\]*\n"                    { set x [expr $x+1] }
733
            -re "^ +\[0-9\]+ 0012 F009\[^\n\]*\n"       { set x [expr $x+1] }
734
            -re "^ +\[0-9\]+ 0014 FE\[^\n\]*\n" { set x [expr $x+1] }
735
            -re "^ +\[0-9\]+ 0015 EB\[^\n\]*\n" { set x [expr $x+1] }
736
            -re "^ +\[0-9\]+ 0016 F6\[^\n\]*\n" { set x [expr $x+1] }
737
            -re "\[^\n\]*\n"                            { }
738
            timeout                             { perror "timeout\n"; break }
739
            eof                                 { break }
740
        }
741
    }
742
 
743
    # This was intended to do any cleanup necessary.  It kinda looks like it
744
    # isn't needed, but just in case, please keep it in for now.
745
    gas_finish
746
 
747
    # Did we find what we were looking for?  If not, flunk it.
748
    if [expr $x==11] then { pass $testname } else { fail $testname }
749
}
750
 
751
proc do_shift {} {
752
    set testname "shift.s: shift tests"
753
    set x 0
754
 
755
    gas_start "shift.s" "-al"
756
 
757
    # Instead of having a variable for each match string just increment the
758
    # total number of matches seen.  That's simpler when testing large numbers
759
    # of instructions (as these tests to).
760
    while 1 {
761
        expect {
762
            -re "^ +\[0-9\]+ 0000 F33A\[^\n\]*\n"       { set x [expr $x+1] }
763
            -re "^ +\[0-9\]+ 0002 F33F\[^\n\]*\n"       { set x [expr $x+1] }
764
            -re "^ +\[0-9\]+ 0004 F335\[^\n\]*\n"       { set x [expr $x+1] }
765
            -re "^ +\[0-9\]+ 0006 F332\[^\n\]*\n"       { set x [expr $x+1] }
766
            -re "\[^\n\]*\n"                            { }
767
            timeout                             { perror "timeout\n"; break }
768
            eof                                 { break }
769
        }
770
    }
771
 
772
    # This was intended to do any cleanup necessary.  It kinda looks like it
773
    # isn't needed, but just in case, please keep it in for now.
774
    gas_finish
775
 
776
    # Did we find what we were looking for?  If not, flunk it.
777
    if [expr $x==4] then { pass $testname } else { fail $testname }
778
}
779
 
780
proc do_sub {} {
781
    set testname "sub.s: sub tests"
782
    set x 0
783
 
784
    gas_start "sub.s" "-al"
785
 
786
    # Instead of having a variable for each match string just increment the
787
    # total number of matches seen.  That's simpler when testing large numbers
788
    # of instructions (as these tests to).
789
    while 1 {
790
        expect {
791
            -re "^ +\[0-9\]+ 0000 A6\[^\n\]*\n" { set x [expr $x+1] }
792
            -re "^ +\[0-9\]+ 0001 F21B\[^\n\]*\n"       { set x [expr $x+1] }
793
            -re "^ +\[0-9\]+ 0003 F2DF\[^\n\]*\n"       { set x [expr $x+1] }
794
            -re "^ +\[0-9\]+ 0005 F25E\[^\n\]*\n"       { set x [expr $x+1] }
795
            -re "^ +\[0-9\]+ 0007 F71EFF7F \[^\n\]*\n"  { set x [expr $x+1] }
796
            -re "^ +\[0-9\]+ 000b F46AFFFF\[^\n\]*\n"   { set x [expr $x+1] }
797
            -re "^ +7 +01\[^\n\]*\n"                    { set x [expr $x+1] }
798
            -re "^ +\[0-9\]+ 0010 F70EFF7F \[^\n\]*\n"  { set x [expr $x+1] }
799
            -re "^ +\[0-9\]+ 0014 F46EFFFF\[^\n\]*\n"   { set x [expr $x+1] }
800
            -re "^ +9 +01\[^\n\]*\n"                    { set x [expr $x+1] }
801
            -re "^ +\[0-9\]+ 0019 F296 \[^\n\]*\n"      { set x [expr $x+1] }
802
            -re "\[^\n\]*\n"                            { }
803
            timeout                             { perror "timeout\n"; break }
804
            eof                                 { break }
805
        }
806
    }
807
 
808
    # This was intended to do any cleanup necessary.  It kinda looks like it
809
    # isn't needed, but just in case, please keep it in for now.
810
    gas_finish
811
 
812
    # Did we find what we were looking for?  If not, flunk it.
813
    if [expr $x==11] then { pass $testname } else { fail $testname }
814
}
815
 
816
if [istarget mn10200*-*-*] then {
817
    # Test the basic instruction parser.
818
    do_add
819
    do_bcc
820
    do_bccx
821
    do_bit
822
    do_cmp
823
    do_ext
824
    do_logical
825
    do_mov1
826
    do_mov2
827
    do_mov3
828
    do_mov4
829
    do_movb
830
    do_movx
831
    do_movbu
832
    do_muldiv
833
    do_other
834
    do_shift
835
    do_sub
836
}

powered by: WebSVN 2.1.0

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