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

Subversion Repositories mlite

[/] [mlite/] [trunk/] [tools/] [opcodes.asm] - Blame information for rev 148

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

Line No. Rev Author Line
1 15 rhoads
##################################################################
2
# TITLE: Opcode Tester
3
# AUTHOR: Steve Rhoads (rhoadss@yahoo.com)
4
# DATE CREATED: 1/10/02
5
# FILENAME: opcodes.asm
6 43 rhoads
# PROJECT: Plasma CPU core
7 15 rhoads
# COPYRIGHT: Software placed into the public domain by the author.
8
#    Software 'as is' without warranty.  Author liable for nothing.
9
# DESCRIPTION:
10
#    This assembly file tests all of the opcodes supported by the
11 43 rhoads
#    Plasma core.
12 148 rhoads
#    This test assumes that address 0x20000000 is the UART write register
13 15 rhoads
#    Successful tests will print out "A" or "AB" or "ABC" or ....
14
#    Missing letters or letters out of order indicate a failure.
15
##################################################################
16
        .text
17
        .align  2
18
        .globl  entry
19
        .ent    entry
20
entry:
21
   .set noreorder
22
 
23 29 rhoads
   #These four instructions must be the first instructions
24
   #convert.exe will correctly initialize $gp
25
   lui   $gp,0
26
   ori   $gp,$gp,0
27
   #convert.exe will set $4=.sbss_start $5=.bss_end
28 111 rhoads
   lui   $4,0
29
   ori   $4,$4,0
30
   lui   $5,0
31
   ori   $5,$5,0
32
   lui   $sp,0
33
   ori   $sp,$sp,0xfff0
34 29 rhoads
 
35 23 rhoads
   mtc0  $0,$12             #disable interrupts
36 148 rhoads
   lui   $20,0x2000         #serial port write address
37 15 rhoads
   ori   $21,$0,'\n'        # letter
38
   ori   $22,$0,'X'         #'X' letter
39 68 rhoads
   ori   $23,$0,'\r'
40 100 rhoads
   ori   $24,$0,0x0f80      #temp memory
41 15 rhoads
 
42
   ######################################
43
   #Arithmetic Instructions
44
   ######################################
45
   ori   $2,$0,'A'
46
   sb    $2,0($20)
47
   ori   $2,$0,'r'
48
   sb    $2,0($20)
49
   ori   $2,$0,'i'
50
   sb    $2,0($20)
51
   ori   $2,$0,'t'
52
   sb    $2,0($20)
53
   ori   $2,$0,'h'
54
   sb    $2,0($20)
55 68 rhoads
   sb    $23,0($20)
56 15 rhoads
   sb    $21,0($20)
57
 
58 23 rhoads
   #a: ADD
59
   ori   $2,$0,'a'
60
   sb    $2,0($20)
61 15 rhoads
   ori   $3,$0,5
62
   ori   $4,$0,60
63
   add   $2,$3,$4
64 23 rhoads
   sb    $2,0($20)    #A
65 68 rhoads
   sb    $23,0($20)
66 15 rhoads
   sb    $21,0($20)
67
 
68 23 rhoads
   #b: ADDI
69
   ori   $2,$0,'b'
70
   sb    $2,0($20)
71 15 rhoads
   ori   $4,$0,60
72
   addi  $2,$4,5
73 23 rhoads
   sb    $2,0($20)    #A
74 68 rhoads
   sb    $23,0($20)
75 15 rhoads
   sb    $21,0($20)
76
 
77 23 rhoads
   #c: ADDIU
78
   ori   $2,$0,'c'
79
   sb    $2,0($20)
80 15 rhoads
   ori   $4,$0,50
81
   addiu $5,$4,15
82 23 rhoads
   sb    $5,0($20)    #A
83 68 rhoads
   sb    $23,0($20)
84 15 rhoads
   sb    $21,0($20)
85
 
86 23 rhoads
   #d: ADDU
87
   ori   $2,$0,'d'
88
   sb    $2,0($20)
89 15 rhoads
   ori   $3,$0,5
90
   ori   $4,$0,60
91
   add   $2,$3,$4
92 23 rhoads
   sb    $2,0($20)    #A
93 68 rhoads
   sb    $23,0($20)
94 15 rhoads
   sb    $21,0($20)
95
 
96 23 rhoads
   #e: DIV
97
   ori   $2,$0,'e'
98
   sb    $2,0($20)
99
   ori   $2,$0,65*117+41
100
   ori   $3,$0,117
101 15 rhoads
   div   $2,$3
102
   nop
103
   mflo  $4
104 23 rhoads
   sb    $4,0($20)    #A
105
   mfhi  $4
106
   addi  $4,$4,66-41
107
   sb    $4,0($20)    #B
108
   li    $2,-67*19
109 15 rhoads
   ori   $3,$0,19
110
   div   $2,$3
111
   nop
112
   mflo  $4
113
   sub   $4,$0,$4
114 23 rhoads
   sb    $4,0($20)    #C
115
   ori   $2,$0,68*23
116 15 rhoads
   li    $3,-23
117
   div   $2,$3
118
   nop
119
   mflo  $4
120
   sub   $4,$0,$4
121 23 rhoads
   sb    $4,0($20)    #D
122
   li    $2,-69*13
123 15 rhoads
   li    $3,-13
124
   div   $2,$3
125
   mflo  $4
126 23 rhoads
   sb    $4,0($20)    #E
127 68 rhoads
   sb    $23,0($20)
128 15 rhoads
   sb    $21,0($20)
129
 
130 23 rhoads
   #f: DIVU
131
   ori   $2,$0,'f'
132
   sb    $2,0($20)
133 15 rhoads
   ori   $2,$0,65*13
134
   ori   $3,$0,13
135 23 rhoads
   divu  $2,$3
136 15 rhoads
   nop
137
   mflo  $4
138 23 rhoads
   sb    $4,0($20)    #A
139 68 rhoads
   sb    $23,0($20)
140 15 rhoads
   sb    $21,0($20)
141
 
142 23 rhoads
   #g: MULT
143
   ori   $2,$0,'g'
144
   sb    $2,0($20)
145 15 rhoads
   ori   $2,$0,5
146
   ori   $3,$0,13
147
   mult  $2,$3
148
   nop
149
   mflo  $4
150 23 rhoads
   sb    $4,0($20)    #A
151 15 rhoads
   li    $2,-5
152
   ori   $3,$0,13
153
   mult  $2,$3
154 100 rhoads
   mfhi  $5
155 15 rhoads
   mflo  $4
156
   sub   $4,$0,$4
157 100 rhoads
   addu  $4,$4,$5
158
   addi  $4,$4,2
159 23 rhoads
   sb    $4,0($20)    #B
160 15 rhoads
   ori   $2,$0,5
161
   li    $3,-13
162
   mult  $2,$3
163 100 rhoads
   mfhi  $5
164 15 rhoads
   mflo  $4
165
   sub   $4,$0,$4
166 100 rhoads
   addu  $4,$4,$5
167
   addi  $4,$4,3
168 23 rhoads
   sb    $4,0($20)    #C
169 15 rhoads
   li    $2,-5
170
   li    $3,-13
171
   mult  $2,$3
172 100 rhoads
   mfhi  $5
173 15 rhoads
   mflo  $4
174 100 rhoads
   addu  $4,$4,$5
175 15 rhoads
   addi  $4,$4,3
176 23 rhoads
   sb    $4,0($20)    #D
177 44 rhoads
   lui   $4,0xfe98
178
   ori   $4,$4,0x62e5
179
   lui   $5,0x6
180
   ori   $5,0x8db8
181
   mult  $4,$5
182
   mfhi  $6
183
   addiu $7,$6,2356+1+'E' #E
184
   sb    $7,0($20)
185 68 rhoads
   sb    $23,0($20)
186 15 rhoads
   sb    $21,0($20)
187
 
188 23 rhoads
   #h: MULTU
189
   ori   $2,$0,'h'
190
   sb    $2,0($20)
191 15 rhoads
   ori   $2,$0,5
192
   ori   $3,$0,13
193 23 rhoads
   multu $2,$3
194 15 rhoads
   nop
195
   mflo  $4
196 23 rhoads
   sb    $4,0($20)    #A
197 68 rhoads
   sb    $23,0($20)
198 15 rhoads
   sb    $21,0($20)
199
 
200 23 rhoads
   #i: SLT
201
   ori   $2,$0,'i'
202
   sb    $2,0($20)
203 15 rhoads
   ori   $2,$0,10
204
   ori   $3,$0,12
205
   slt   $4,$2,$3
206
   addi  $5,$4,64
207 23 rhoads
   sb    $5,0($20)    #A
208 15 rhoads
   slt   $4,$3,$2
209
   addi  $5,$4,66
210 23 rhoads
   sb    $5,0($20)    #B
211 15 rhoads
   li    $2,0xfffffff0
212
   slt   $4,$2,$3
213
   addi  $5,$4,66
214 23 rhoads
   sb    $5,0($20)    #C
215 15 rhoads
   slt   $4,$3,$2
216
   addi  $5,$4,68
217 23 rhoads
   sb    $5,0($20)    #D
218 15 rhoads
   li    $3,0xffffffff
219
   slt   $4,$2,$3
220
   addi  $5,$4,68
221 23 rhoads
   sb    $5,0($20)    #E
222 15 rhoads
   slt   $4,$3,$2
223
   addi  $5,$4,70
224 23 rhoads
   sb    $5,0($20)    #F
225 68 rhoads
   sb    $23,0($20)
226 15 rhoads
   sb    $21,0($20)
227
 
228 23 rhoads
   #j: SLTI
229
   ori   $2,$0,'j'
230
   sb    $2,0($20)
231 15 rhoads
   ori   $2,$0,10
232
   slti  $4,$2,12
233
   addi  $5,$4,64
234 23 rhoads
   sb    $5,0($20)    #A
235 15 rhoads
   slti  $4,$2,8
236
   addi  $5,$4,66
237 23 rhoads
   sb    $5,0($20)    #B
238 68 rhoads
   sb    $23,0($20)
239 15 rhoads
   sb    $21,0($20)
240
 
241 23 rhoads
   #k: SLTIU
242
   ori   $2,$0,'k'
243
   sb    $2,0($20)
244 15 rhoads
   ori   $2,$0,10
245
   sltiu $4,$2,12
246
   addi  $5,$4,64
247 23 rhoads
   sb    $5,0($20)    #A
248 15 rhoads
   sltiu $4,$2,8
249
   addi  $5,$4,66
250 23 rhoads
   sb    $5,0($20)    #B
251 68 rhoads
   sb    $23,0($20)
252 15 rhoads
   sb    $21,0($20)
253
 
254 23 rhoads
   #l: SLTU
255
   ori   $2,$0,'l'
256
   sb    $2,0($20)
257 15 rhoads
   ori   $2,$0,10
258
   ori   $3,$0,12
259
   slt   $4,$2,$3
260
   addi  $5,$4,64
261 23 rhoads
   sb    $5,0($20)    #A
262 15 rhoads
   slt   $4,$3,$2
263
   addi  $5,$4,66
264 23 rhoads
   sb    $5,0($20)    #B
265 68 rhoads
   sb    $23,0($20)
266 15 rhoads
   sb    $21,0($20)
267
 
268 23 rhoads
   #m: SUB
269
   ori   $2,$0,'m'
270
   sb    $2,0($20)
271 15 rhoads
   ori   $3,$0,70
272
   ori   $4,$0,5
273
   sub   $2,$3,$4
274 23 rhoads
   sb    $2,0($20)    #A
275 68 rhoads
   sb    $23,0($20)
276 15 rhoads
   sb    $21,0($20)
277
 
278 23 rhoads
   #n: SUBU
279
   ori   $2,$0,'n'
280
   sb    $2,0($20)
281 15 rhoads
   ori   $3,$0,70
282
   ori   $4,$0,5
283
   sub   $2,$3,$4
284 23 rhoads
   sb    $2,0($20)    #A
285 68 rhoads
   sb    $23,0($20)
286 15 rhoads
   sb    $21,0($20)
287
 
288
   ######################################
289
   #Branch and Jump Instructions
290
   ######################################
291
   ori   $2,$0,'B'
292
   sb    $2,0($20)
293
   ori   $2,$0,'r'
294
   sb    $2,0($20)
295
   ori   $2,$0,'a'
296
   sb    $2,0($20)
297
   ori   $2,$0,'n'
298
   sb    $2,0($20)
299
   ori   $2,$0,'c'
300
   sb    $2,0($20)
301
   ori   $2,$0,'h'
302
   sb    $2,0($20)
303 68 rhoads
   sb    $23,0($20)
304 15 rhoads
   sb    $21,0($20)
305
 
306 23 rhoads
   #a: B
307
   ori   $2,$0,'a'
308
   sb    $2,0($20)
309 15 rhoads
   ori   $10,$0,'A'
310
   ori   $11,$0,'B'
311
   b     $B1
312
   sb    $10,0($20)
313
   sb    $22,0($20)
314
$B1:
315
   sb    $11,0($20)
316 68 rhoads
   sb    $23,0($20)
317 15 rhoads
   sb    $21,0($20)
318
 
319 23 rhoads
   #b: BAL
320
   ori   $2,$0,'b'
321
   sb    $2,0($20)
322 15 rhoads
   ori   $10,$0,'A'
323
   ori   $11,$0,'B'
324
   ori   $12,$0,'C'
325
   ori   $13,$0,'D'
326
   ori   $14,$0,'E'
327
   ori   $15,$0,'X'
328
   bal   $BAL1
329
   sb    $10,0($20)
330
   sb    $13,0($20)
331
   b     $BAL2
332
   sb    $14,0($20)
333
   sb    $15,0($20)
334
$BAL1:
335
   sb    $11,0($20)
336
   jr    $31
337
   sb    $12,0($20)
338
   sb    $22,0($20)
339
$BAL2:
340 68 rhoads
   sb    $23,0($20)
341 15 rhoads
   sb    $21,0($20)
342
 
343 23 rhoads
   #c: BEQ
344
   ori   $2,$0,'c'
345
   sb    $2,0($20)
346 15 rhoads
   ori   $10,$0,'A'
347
   ori   $11,$0,'B'
348
   ori   $12,$0,'C'
349
   ori   $13,$0,'D'
350
   ori   $2,$0,100
351
   ori   $3,$0,123
352
   ori   $4,$0,123
353
   beq   $2,$3,$BEQ1
354
   sb    $10,0($20)
355
   sb    $11,0($20)
356
   beq   $3,$4,$BEQ1
357
   sb    $12,0($20)
358
   sb    $22,0($20)
359
$BEQ1:
360
   sb    $13,0($20)
361 68 rhoads
   sb    $23,0($20)
362 15 rhoads
   sb    $21,0($20)
363
 
364 23 rhoads
   #d: BGEZ
365
   ori   $2,$0,'d'
366
   sb    $2,0($20)
367 15 rhoads
   ori   $10,$0,'A'
368
   ori   $11,$0,'B'
369
   ori   $12,$0,'C'
370
   ori   $13,$0,'D'
371
   or    $15,$0,'X'
372
   ori   $2,$0,100
373
   li    $3,0xffff1234
374
   ori   $4,$0,123
375
   bgez  $3,$BGEZ1
376
   sb    $10,0($20)
377
   sb    $11,0($20)
378
   bgez  $2,$BGEZ1
379
   sb    $12,0($20)
380
   sb    $22,0($20)
381
$BGEZ1:
382
   bgez  $0,$BGEZ2
383
   nop
384
   sb    $15,0($20)
385
$BGEZ2:
386
   sb    $13,0($20)
387 68 rhoads
   sb    $23,0($20)
388 15 rhoads
   sb    $21,0($20)
389
 
390 23 rhoads
   #e: BGEZAL
391
   ori   $2,$0,'e'
392
   sb    $2,0($20)
393 15 rhoads
   ori   $10,$0,'A'
394
   ori   $11,$0,'B'
395
   ori   $12,$0,'C'
396
   ori   $13,$0,'D'
397
   ori   $14,$0,'E'
398
   ori   $15,$0,'X'
399
   li    $3,0xffff1234
400
   bgezal $3,$BGEZAL1
401
   nop
402
   sb    $10,0($20)
403
   bgezal $0,$BGEZAL1
404
   nop
405
   sb    $13,0($20)
406
   b     $BGEZAL2
407
   sb    $14,0($20)
408
   sb    $15,0($20)
409
$BGEZAL1:
410
   sb    $11,0($20)
411
   jr    $31
412
   sb    $12,0($20)
413
   sb    $22,0($20)
414
$BGEZAL2:
415 68 rhoads
   sb    $23,0($20)
416 15 rhoads
   sb    $21,0($20)
417
 
418 23 rhoads
   #f: BGTZ
419
   ori   $2,$0,'f'
420
   sb    $2,0($20)
421 15 rhoads
   ori   $10,$0,'A'
422
   ori   $11,$0,'B'
423
   ori   $12,$0,'C'
424
   ori   $13,$0,'D'
425
   ori   $2,$0,100
426
   li    $3,0xffff1234
427
   bgtz  $3,$BGTZ1
428
   sb    $10,0($20)
429
   sb    $11,0($20)
430
   bgtz  $2,$BGTZ1
431
   sb    $12,0($20)
432
   sb    $22,0($20)
433
$BGTZ1:
434
   sb    $13,0($20)
435 68 rhoads
   sb    $23,0($20)
436 15 rhoads
   sb    $21,0($20)
437
 
438 23 rhoads
   #g: BLEZ
439
   ori   $2,$0,'g'
440
   sb    $2,0($20)
441 15 rhoads
   ori   $10,$0,'A'
442
   ori   $11,$0,'B'
443
   ori   $12,$0,'C'
444
   ori   $13,$0,'D'
445
   ori   $2,$0,100
446
   li    $3,0xffff1234
447
   blez  $2,$BLEZ1
448
   sb    $10,0($20)
449
   sb    $11,0($20)
450
   blez  $3,$BLEZ1
451
   sb    $12,0($20)
452
   sb    $22,0($20)
453
$BLEZ1:
454
   blez  $0,$BLEZ2
455
   nop
456
   sb    $22,0($20)
457
$BLEZ2:
458
   sb    $13,0($20)
459 68 rhoads
   sb    $23,0($20)
460 15 rhoads
   sb    $21,0($20)
461
 
462 23 rhoads
   #h: BLTZ
463
   ori   $2,$0,'h'
464
   sb    $2,0($20)
465 15 rhoads
   ori   $10,$0,'A'
466
   ori   $11,$0,'B'
467
   ori   $12,$0,'C'
468
   ori   $13,$0,'D'
469
   ori   $14,$0,'E'
470
   ori   $2,$0,100
471
   li    $3,0xffff1234
472
   ori   $4,$0,0
473
   bltz  $2,$BLTZ1
474
   sb    $10,0($20)
475
   sb    $11,0($20)
476
   bltz  $3,$BLTZ1
477
   sb    $12,0($20)
478
   sb    $22,0($20)
479
$BLTZ1:
480
   bltz  $4,$BLTZ2
481
   nop
482
   sb    $13,0($20)
483
$BLTZ2:
484
   sb    $14,0($20)
485 68 rhoads
   sb    $23,0($20)
486 15 rhoads
   sb    $21,0($20)
487
 
488 23 rhoads
   #i: BLTZAL
489
   ori   $2,$0,'i'
490
   sb    $2,0($20)
491 15 rhoads
   ori   $10,$0,'A'
492
   ori   $11,$0,'B'
493
   ori   $12,$0,'C'
494
   ori   $13,$0,'D'
495
   ori   $14,$0,'E'
496
   ori   $15,$0,'X'
497
   li    $3,0xffff1234
498
   bltzal $0,$BLTZAL1
499
   nop
500
   sb    $10,0($20)
501
   bltzal $3,$BLTZAL1
502
   nop
503
   sb    $13,0($20)
504
   b     $BLTZAL2
505
   sb    $14,0($20)
506
   sb    $15,0($20)
507
$BLTZAL1:
508
   sb    $11,0($20)
509
   jr    $31
510
   sb    $12,0($20)
511
   sb    $22,0($20)
512
$BLTZAL2:
513 68 rhoads
   sb    $23,0($20)
514 15 rhoads
   sb    $21,0($20)
515
 
516 23 rhoads
   #j: BNE
517
   ori   $2,$0,'j'
518
   sb    $2,0($20)
519 15 rhoads
   ori   $10,$0,'A'
520
   ori   $11,$0,'B'
521
   ori   $12,$0,'C'
522
   ori   $13,$0,'D'
523
   ori   $2,$0,100
524
   ori   $3,$0,123
525
   ori   $4,$0,123
526
   bne   $3,$4,$BNE1
527
   sb    $10,0($20)
528
   sb    $11,0($20)
529
   bne   $2,$3,$BNE1
530
   sb    $12,0($20)
531
   sb    $22,0($20)
532
$BNE1:
533
   sb    $13,0($20)
534 68 rhoads
   sb    $23,0($20)
535 15 rhoads
   sb    $21,0($20)
536
 
537 23 rhoads
   #k: J
538
   ori   $2,$0,'k'
539
   sb    $2,0($20)
540 15 rhoads
   ori   $10,$0,'A'
541
   ori   $11,$0,'B'
542
   ori   $15,$0,'X'
543
   j     $J1
544
   sb    $10,0($20)
545
   sb    $15,0($20)
546
$J1:
547
   sb    $11,0($20)
548 68 rhoads
   sb    $23,0($20)
549 15 rhoads
   sb    $21,0($20)
550
 
551 23 rhoads
   #l: JAL
552
   ori   $2,$0,'l'
553
   sb    $2,0($20)
554 15 rhoads
   ori   $10,$0,'A'
555
   ori   $11,$0,'B'
556
   ori   $12,$0,'C'
557
   ori   $13,$0,'D'
558
   ori   $14,$0,'E'
559
   ori   $15,$0,'X'
560
   jal   $JAL1
561
   sb    $10,0($20)
562
   sb    $13,0($20)
563
   b     $JAL2
564
   sb    $14,0($20)
565
   sb    $15,0($20)
566
$JAL1:
567
   sb    $11,0($20)
568
   jr    $31
569
   sb    $12,0($20)
570
   sb    $22,0($20)
571
$JAL2:
572 68 rhoads
   sb    $23,0($20)
573 15 rhoads
   sb    $21,0($20)
574
 
575 23 rhoads
   #m: JALR
576
   ori   $2,$0,'m'
577
   sb    $2,0($20)
578 15 rhoads
   ori   $10,$0,'A'
579
   ori   $11,$0,'B'
580
   ori   $12,$0,'C'
581
   ori   $13,$0,'D'
582
   ori   $14,$0,'E'
583
   ori   $15,$0,'X'
584
   la    $3,$JALR1
585
   jalr  $3
586
   sb    $10,0($20)
587
   sb    $13,0($20)
588
   b     $JALR2
589
   sb    $14,0($20)
590
   sb    $15,0($20)
591
$JALR1:
592
   sb    $11,0($20)
593
   jr    $31
594
   sb    $12,0($20)
595
   sb    $22,0($20)
596
$JALR2:
597 68 rhoads
   sb    $23,0($20)
598 15 rhoads
   sb    $21,0($20)
599
 
600 23 rhoads
   #n: JR
601
   ori   $2,$0,'n'
602
   sb    $2,0($20)
603 15 rhoads
   ori   $10,$0,'A'
604
   ori   $11,$0,'B'
605
   ori   $15,$0,'X'
606
   la    $3,$JR1
607
   jr    $3
608
   sb    $10,0($20)
609
   sb    $15,0($20)
610
$JR1:
611
   sb    $11,0($20)
612 68 rhoads
   sb    $23,0($20)
613 15 rhoads
   sb    $21,0($20)
614
 
615 23 rhoads
   #o: NOP
616
   ori   $2,$0,'o'
617
   sb    $2,0($20)
618 15 rhoads
   ori   $2,$0,65
619
   nop
620
   sb    $2,0($20)
621 68 rhoads
   sb    $23,0($20)
622 15 rhoads
   sb    $21,0($20)
623
 
624 148 rhoads
 
625 15 rhoads
   ######################################
626
   #Load, Store, and Memory Control Instructions
627
   ######################################
628
   ori   $2,$0,'L'
629
   sb    $2,0($20)
630
   ori   $2,$0,'o'
631
   sb    $2,0($20)
632
   ori   $2,$0,'a'
633
   sb    $2,0($20)
634
   ori   $2,$0,'d'
635
   sb    $2,0($20)
636 68 rhoads
   sb    $23,0($20)
637 15 rhoads
   sb    $21,0($20)
638
 
639 23 rhoads
   #a: LB
640
   ori   $2,$0,'a'
641
   sb    $2,0($20)
642 68 rhoads
   or    $2,$0,$24
643 148 rhoads
   li    $3,0x414243fc
644 15 rhoads
   sw    $3,16($2)
645
   lb    $4,16($2)
646
   sb    $4,0($20)
647
   lb    $4,17($2)
648
   sb    $4,0($20)
649
   lb    $4,18($2)
650
   sb    $4,0($20)
651
   lb    $2,19($2)
652 148 rhoads
   sra   $3,$2,8
653
   addi  $3,$3,0x45
654
   sb    $3,0($20)
655
   addi  $2,$2,0x49
656 15 rhoads
   sb    $2,0($20)
657 68 rhoads
   sb    $23,0($20)
658 15 rhoads
   sb    $21,0($20)
659
 
660 23 rhoads
   #b: LBU
661
   ori   $2,$0,'b'
662
   sb    $2,0($20)
663 68 rhoads
   or    $2,$0,$24
664 15 rhoads
   li    $3,0x41424344
665
   sw    $3,16($2)
666
   lb    $4,16($2)
667
   sb    $4,0($20)
668
   lb    $4,17($2)
669
   sb    $4,0($20)
670
   lb    $4,18($2)
671
   sb    $4,0($20)
672
   lb    $2,19($2)
673
   sb    $2,0($20)
674 68 rhoads
   sb    $23,0($20)
675 15 rhoads
   sb    $21,0($20)
676
 
677 23 rhoads
   #c: LH
678
   ori   $2,$0,'c'
679
   sb    $2,0($20)
680 68 rhoads
   or    $2,$0,$24
681 15 rhoads
   li    $3,0x00410042
682
   sw    $3,16($2)
683
   lh    $4,16($2)
684
   sb    $4,0($20)
685
   lh    $2,18($2)
686
   sb    $2,0($20)
687 68 rhoads
   sb    $23,0($20)
688 15 rhoads
   sb    $21,0($20)
689
 
690 23 rhoads
   #d: LHU
691
   ori   $2,$0,'d'
692
   sb    $2,0($20)
693 68 rhoads
   or    $2,$0,$24
694 15 rhoads
   li    $3,0x00410042
695
   sw    $3,16($2)
696
   lh    $4,16($2)
697
   sb    $4,0($20)
698
   lh    $2,18($2)
699
   sb    $2,0($20)
700 68 rhoads
   sb    $23,0($20)
701 15 rhoads
   sb    $21,0($20)
702
 
703 23 rhoads
   #e: LW
704
   ori   $2,$0,'e'
705
   sb    $2,0($20)
706 68 rhoads
   or    $2,$0,$24
707 15 rhoads
   li    $3,'A'
708
   sw    $3,16($2)
709
   ori   $3,$0,0
710
   lw    $2,16($2)
711
   sb    $2,0($20)
712 68 rhoads
   sb    $23,0($20)
713 15 rhoads
   sb    $21,0($20)
714
 
715 23 rhoads
   #f: LWL & LWR
716
   ori   $2,$0,'f'
717
   sb    $2,0($20)
718 68 rhoads
   or    $2,$0,$24
719 15 rhoads
   li    $3,'A'
720
   sw    $3,16($2)
721
   ori   $3,$0,0
722
   lwl   $2,16($2)
723
   lwr   $2,16($2)
724
   sb    $2,0($20)
725 68 rhoads
   sb    $23,0($20)
726 15 rhoads
   sb    $21,0($20)
727
 
728 23 rhoads
   #g: SB
729
   ori   $2,$0,'g'
730
   sb    $2,0($20)
731 15 rhoads
   ori   $2,$0,'A'
732
   sb    $2,0($20)
733 68 rhoads
   sb    $23,0($20)
734 15 rhoads
   sb    $21,0($20)
735
 
736 23 rhoads
   #h: SH
737
   ori   $2,$0,'h'
738
   sb    $2,0($20)
739 68 rhoads
   or    $4,$0,$24
740 15 rhoads
   ori   $2,$0,0x4142
741 29 rhoads
   sh    $2,16($4)
742
   lb    $3,16($4)
743 15 rhoads
   sb    $3,0($20)
744 29 rhoads
   lb    $2,17($4)
745 15 rhoads
   sb    $2,0($20)
746 68 rhoads
   sb    $23,0($20)
747 15 rhoads
   sb    $21,0($20)
748
 
749 23 rhoads
   #i: SW
750
   ori   $2,$0,'i'
751
   sb    $2,0($20)
752 68 rhoads
   or    $2,$0,$24
753 15 rhoads
   li    $3,0x41424344
754
   sw    $3,16($2)
755
   lb    $4,16($2)
756
   sb    $4,0($20)
757
   lb    $4,17($2)
758
   sb    $4,0($20)
759
   lb    $4,18($2)
760
   sb    $4,0($20)
761
   lb    $2,19($2)
762
   sb    $2,0($20)
763 68 rhoads
   sb    $23,0($20)
764 15 rhoads
   sb    $21,0($20)
765
 
766 23 rhoads
   #j: SWL & SWR
767
   ori   $2,$0,'j'
768
   sb    $2,0($20)
769 68 rhoads
   or    $2,$0,$24
770 15 rhoads
   li    $3,0x41424344
771
   swl   $3,16($2)
772
   swr   $3,16($2)
773
   lb    $4,16($2)
774
   sb    $4,0($20)
775
   lb    $4,17($2)
776
   sb    $4,0($20)
777
   lb    $4,18($2)
778
   sb    $4,0($20)
779
   lb    $2,19($2)
780
   sb    $2,0($20)
781 68 rhoads
   sb    $23,0($20)
782 15 rhoads
   sb    $21,0($20)
783
 
784
 
785
   ######################################
786
   #Logical Instructions
787
   ######################################
788
   ori   $2,$0,'L'
789
   sb    $2,0($20)
790
   ori   $2,$0,'o'
791
   sb    $2,0($20)
792
   ori   $2,$0,'g'
793
   sb    $2,0($20)
794
   ori   $2,$0,'i'
795
   sb    $2,0($20)
796
   ori   $2,$0,'c'
797
   sb    $2,0($20)
798 68 rhoads
   sb    $23,0($20)
799 15 rhoads
   sb    $21,0($20)
800
 
801 23 rhoads
   #a: AND
802
   ori   $2,$0,'a'
803
   sb    $2,0($20)
804 15 rhoads
   ori   $2,$0,0x0741
805
   ori   $3,$0,0x60f3
806
   and   $4,$2,$3
807
   sb    $4,0($20)
808 68 rhoads
   sb    $23,0($20)
809 15 rhoads
   sb    $21,0($20)
810
 
811 23 rhoads
   #b: ANDI
812
   ori   $2,$0,'b'
813
   sb    $2,0($20)
814 15 rhoads
   ori   $2,$0,0x0741
815
   andi  $4,$2,0x60f3
816
   sb    $4,0($20)
817 68 rhoads
   sb    $23,0($20)
818 15 rhoads
   sb    $21,0($20)
819
 
820 23 rhoads
   #c: LUI
821
   ori   $2,$0,'c'
822
   sb    $2,0($20)
823 15 rhoads
   lui   $2,0x41
824
   srl   $3,$2,16
825
   sb    $3,0($20)
826 68 rhoads
   sb    $23,0($20)
827 15 rhoads
   sb    $21,0($20)
828
 
829 23 rhoads
   #d: NOR
830
   ori   $2,$0,'d'
831
   sb    $2,0($20)
832 15 rhoads
   li    $2,0xf0fff08e
833
   li    $3,0x0f0f0f30
834
   nor   $4,$2,$3
835
   sb    $4,0($20)
836 68 rhoads
   sb    $23,0($20)
837 15 rhoads
   sb    $21,0($20)
838
 
839 23 rhoads
   #e: OR
840
   ori   $2,$0,'e'
841
   sb    $2,0($20)
842 15 rhoads
   ori   $2,$0,0x40
843
   ori   $3,$0,0x01
844
   or    $4,$2,$3
845
   sb    $4,0($20)
846 68 rhoads
   sb    $23,0($20)
847 15 rhoads
   sb    $21,0($20)
848
 
849 23 rhoads
   #f: ORI
850
   ori   $2,$0,'f'
851
   sb    $2,0($20)
852 15 rhoads
   ori   $2,$0,0x40
853
   ori   $4,$2,0x01
854
   sb    $4,0($20)
855 68 rhoads
   sb    $23,0($20)
856 15 rhoads
   sb    $21,0($20)
857
 
858 23 rhoads
   #g: XOR
859
   ori   $2,$0,'g'
860
   sb    $2,0($20)
861 15 rhoads
   ori   $2,$0,0xf043
862
   ori   $3,$0,0xf002
863
   xor   $4,$2,$3
864
   sb    $4,0($20)
865 68 rhoads
   sb    $23,0($20)
866 15 rhoads
   sb    $21,0($20)
867
 
868 23 rhoads
   #h: XORI
869
   ori   $2,$0,'h'
870
   sb    $2,0($20)
871 15 rhoads
   ori   $2,$0,0xf043
872
   xor   $4,$2,0xf002
873
   sb    $4,0($20)
874 68 rhoads
   sb    $23,0($20)
875 15 rhoads
   sb    $21,0($20)
876
 
877
 
878
   ######################################
879
   #Move Instructions
880
   ######################################
881
   ori   $2,$0,'M'
882
   sb    $2,0($20)
883
   ori   $2,$0,'o'
884
   sb    $2,0($20)
885
   ori   $2,$0,'v'
886
   sb    $2,0($20)
887
   ori   $2,$0,'e'
888
   sb    $2,0($20)
889 68 rhoads
   sb    $23,0($20)
890 15 rhoads
   sb    $21,0($20)
891
 
892 23 rhoads
   #a: MFHI
893
   ori   $2,$0,'a'
894
   sb    $2,0($20)
895 15 rhoads
   ori   $2,$0,65
896
   mthi  $2
897
   mfhi  $3
898
   sb    $3,0($20)
899 68 rhoads
   sb    $23,0($20)
900 15 rhoads
   sb    $21,0($20)
901
 
902 23 rhoads
   #b: MFLO
903
   ori   $2,$0,'b'
904
   sb    $2,0($20)
905 15 rhoads
   ori   $2,$0,65
906
   mtlo  $2
907
   mflo  $3
908
   sb    $3,0($20)
909 68 rhoads
   sb    $23,0($20)
910 15 rhoads
   sb    $21,0($20)
911
 
912 23 rhoads
   #c: MTHI
913
   ori   $2,$0,'c'
914
   sb    $2,0($20)
915 15 rhoads
   ori   $2,$0,65
916
   mthi  $2
917
   mfhi  $3
918
   sb    $3,0($20)
919 68 rhoads
   sb    $23,0($20)
920 15 rhoads
   sb    $21,0($20)
921
 
922 23 rhoads
   #d: MTLO
923
   ori   $2,$0,'d'
924
   sb    $2,0($20)
925 15 rhoads
   ori   $2,$0,65
926
   mtlo  $2
927
   mflo  $3
928
   sb    $3,0($20)
929 68 rhoads
   sb    $23,0($20)
930 15 rhoads
   sb    $21,0($20)
931
 
932
 
933
   ######################################
934
   #Shift Instructions
935
   ######################################
936
   ori   $2,$0,'S'
937
   sb    $2,0($20)
938
   ori   $2,$0,'h'
939
   sb    $2,0($20)
940
   ori   $2,$0,'i'
941
   sb    $2,0($20)
942
   ori   $2,$0,'f'
943
   sb    $2,0($20)
944
   ori   $2,$0,'t'
945
   sb    $2,0($20)
946 68 rhoads
   sb    $23,0($20)
947 15 rhoads
   sb    $21,0($20)
948
 
949 23 rhoads
   #a: SLL
950
   ori   $2,$0,'a'
951
   sb    $2,0($20)
952 15 rhoads
   li    $2,0x40414243
953
   sll   $3,$2,8
954
   srl   $3,$3,24
955
   sb    $3,0($20)
956 68 rhoads
   sb    $23,0($20)
957 15 rhoads
   sb    $21,0($20)
958
 
959 23 rhoads
   #b: SLLV
960
   ori   $2,$0,'b'
961
   sb    $2,0($20)
962 15 rhoads
   li    $2,0x40414243
963
   ori   $3,$0,8
964
   sllv  $3,$2,$3
965
   srl   $3,$3,24
966
   sb    $3,0($20)
967 68 rhoads
   sb    $23,0($20)
968 15 rhoads
   sb    $21,0($20)
969
 
970 23 rhoads
   #c: SRA
971
   ori   $2,$0,'c'
972
   sb    $2,0($20)
973 15 rhoads
   li    $2,0x40414243
974
   sra   $3,$2,16
975
   sb    $3,0($20)
976
   li    $2,0x84000000
977
   sra   $3,$2,25
978
   sub   $3,$3,0x80
979
   sb    $3,0($20)
980 68 rhoads
   sb    $23,0($20)
981 15 rhoads
   sb    $21,0($20)
982
 
983 23 rhoads
   #d: SRAV
984
   ori   $2,$0,'d'
985
   sb    $2,0($20)
986 15 rhoads
   li    $2,0x40414243
987
   ori   $3,$0,16
988
   srav  $3,$2,$3
989
   sb    $3,0($20)
990
   ori   $3,$0,25
991
   li    $2,0x84000000
992 29 rhoads
   srav  $3,$2,$3
993 15 rhoads
   sub   $3,$3,0x80
994
   sb    $3,0($20)
995 68 rhoads
   sb    $23,0($20)
996 15 rhoads
   sb    $21,0($20)
997
 
998 23 rhoads
   #e: SRL
999
   ori   $2,$0,'e'
1000
   sb    $2,0($20)
1001 15 rhoads
   li    $2,0x40414243
1002
   srl   $3,$2,16
1003
   sb    $3,0($20)
1004
   li    $2,0x84000000
1005 29 rhoads
   srl   $3,$2,25
1006 15 rhoads
   sb    $3,0($20)
1007 68 rhoads
   sb    $23,0($20)
1008 15 rhoads
   sb    $21,0($20)
1009
 
1010 23 rhoads
   #f: SRLV
1011
   ori   $2,$0,'f'
1012
   sb    $2,0($20)
1013 15 rhoads
   li    $2,0x40414243
1014
   ori   $3,$0,16
1015
   srlv  $4,$2,$3
1016
   sb    $4,0($20)
1017
   ori   $3,$0,25
1018
   li    $2,0x84000000
1019 29 rhoads
   srlv  $3,$2,$3
1020 15 rhoads
   sb    $3,0($20)
1021 68 rhoads
   sb    $23,0($20)
1022 15 rhoads
   sb    $21,0($20)
1023
 
1024
 
1025
   ori   $2,$0,'D'
1026
   sb    $2,0($20)
1027
   ori   $2,$0,'o'
1028
   sb    $2,0($20)
1029
   ori   $2,$0,'n'
1030
   sb    $2,0($20)
1031
   ori   $2,$0,'e'
1032
   sb    $2,0($20)
1033 68 rhoads
   sb    $23,0($20)
1034 15 rhoads
   sb    $21,0($20)
1035
 
1036
 
1037
$DONE:
1038
   j     $DONE
1039
   nop
1040
 
1041
   .set reorder
1042
        .end    entry
1043
 

powered by: WebSVN 2.1.0

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