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

Subversion Repositories plasma

[/] [plasma/] [trunk/] [tools/] [opcodes.asm] - Blame information for rev 100

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

powered by: WebSVN 2.1.0

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