Last change
on this file since 100 was
100,
checked in by rosiere, 15 years ago
|
1) Bug fix (Operation, Instruction)
2) Modif Return Address Stack
3) Add Soft Test
4) Add Soc Test
|
-
Property svn:keywords set to
Id
|
File size:
1.4 KB
|
Rev | Line | |
---|
[100] | 1 | /* |
---|
| 2 | * Test_016 |
---|
| 3 | * |
---|
| 4 | * end_ko : infinite_loop |
---|
| 5 | * end_ok : Write in R1 the stop address and stop an data |
---|
| 6 | * The store in the destination of an jump |
---|
| 7 | * start : Test l.bnf |
---|
| 8 | */ |
---|
| 9 | |
---|
| 10 | .file "crt0.s" |
---|
| 11 | /* |
---|
| 12 | .section .vector |
---|
| 13 | */ |
---|
| 14 | .section .text |
---|
| 15 | .align 4 |
---|
| 16 | |
---|
| 17 | /* ---[ 0x0 : Print a error ]------------------------------------------- */ |
---|
| 18 | |
---|
| 19 | .org 0x0 |
---|
| 20 | _end_ko : |
---|
| 21 | _infinite_loop : |
---|
| 22 | l.j _infinite_loop |
---|
| 23 | l.nop |
---|
| 24 | |
---|
| 25 | _end_ok : |
---|
| 26 | l.movhi r1, hi(_tty) |
---|
| 27 | l.ori r1, r1, lo(_tty) |
---|
| 28 | l.sw 4(r1), r1 /* stop address */ |
---|
| 29 | |
---|
| 30 | |
---|
| 31 | /* ---[ 0x100: RESET exception ]----------------------------------------- */ |
---|
| 32 | .org 0x100 |
---|
| 33 | .global _start |
---|
| 34 | _start: |
---|
| 35 | |
---|
| 36 | l.movhi r2, hi(0x00000010) /* count max */ |
---|
| 37 | l.ori r2, r2, lo(0x00000010) |
---|
| 38 | |
---|
| 39 | /**********/ |
---|
| 40 | /* Test 1 */ |
---|
| 41 | /**********/ |
---|
| 42 | |
---|
| 43 | l.movhi r1, hi(0x00000000) /* RA */ |
---|
| 44 | l.ori r1, r1, lo(0x00000000) |
---|
| 45 | |
---|
| 46 | /* Test result */ |
---|
| 47 | _test_1_loop : |
---|
| 48 | l.sfne r1, r2 |
---|
| 49 | l.bnf _test_1_end |
---|
| 50 | l.addi r1, r1, 1 |
---|
| 51 | _test_1_end : |
---|
| 52 | |
---|
| 53 | /**********/ |
---|
| 54 | /* Test 2 */ |
---|
| 55 | /**********/ |
---|
| 56 | |
---|
| 57 | l.movhi r1, hi(0x00000000) /* RA */ |
---|
| 58 | l.ori r1, r1, lo(0x00000000) |
---|
| 59 | |
---|
| 60 | /* Test result */ |
---|
| 61 | _test_2_loop : |
---|
| 62 | l.sfeq r1, r2 |
---|
| 63 | l.bnf _test_2_loop |
---|
| 64 | l.addi r1, r1, 1 |
---|
| 65 | _test_2_end : |
---|
| 66 | |
---|
| 67 | |
---|
| 68 | /**********/ |
---|
| 69 | /* End */ |
---|
| 70 | /**********/ |
---|
| 71 | |
---|
| 72 | l.j _end_ok |
---|
| 73 | l.nop |
---|
Note: See
TracBrowser
for help on using the repository browser.