1 | /* |
---|
2 | * Test_049 |
---|
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 dependencies between access memory |
---|
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 | l.movhi r1, hi(_tty) |
---|
22 | l.ori r1, r1, lo(_tty) |
---|
23 | l.sw 4(r1), r1 /* stop address */ |
---|
24 | _infinite_loop : |
---|
25 | l.j _infinite_loop |
---|
26 | l.nop |
---|
27 | |
---|
28 | _end_ok : |
---|
29 | l.movhi r1, hi(_tty) |
---|
30 | l.ori r1, r1, lo(_tty) |
---|
31 | l.sw 4(r1), r0 /* stop address */ |
---|
32 | |
---|
33 | |
---|
34 | /* ---[ 0x100: RESET exception ]----------------------------------------- */ |
---|
35 | .org 0x100 |
---|
36 | .global _start |
---|
37 | _start: |
---|
38 | l.movhi r1, hi(_stack) /* address */ |
---|
39 | l.ori r1, r1, lo(_stack) |
---|
40 | |
---|
41 | l.movhi r2, hi(0x00000010) /* iteration */ |
---|
42 | l.ori r2, r2, lo(0x00000010) |
---|
43 | |
---|
44 | l.movhi r3, hi(0xdeadbeef) /* data 1 */ |
---|
45 | l.ori r3, r3, lo(0xdeadbeef) |
---|
46 | l.movhi r4, hi(0x12345678) /* data 2 */ |
---|
47 | l.ori r4, r4, lo(0x12345678) |
---|
48 | |
---|
49 | l.j _loop1_store_test |
---|
50 | l.and r20, r0, r0 /* iterator */ |
---|
51 | _loop1_store_body : |
---|
52 | l.srli r5, r3, 0 /* deadbeef */ |
---|
53 | l.srli r6, r3, 8 /* 00deadbe */ |
---|
54 | l.srli r7, r3, 16 /* 0000dead */ |
---|
55 | l.srli r8, r4, 8 /* 00123456 */ |
---|
56 | l.srli r9, r4, 16 /* 00001234 */ |
---|
57 | |
---|
58 | l.sb +3(r1), r5 |
---|
59 | l.sb +2(r1), r6 |
---|
60 | l.lhz r10, +2(r1) |
---|
61 | l.sh +0(r1), r7 |
---|
62 | l.lwz r11, +0(r1) |
---|
63 | |
---|
64 | l.sw -4(r1), r3 |
---|
65 | l.sh -2(r1), r1 |
---|
66 | l.sb -1(r1), r4 |
---|
67 | l.sh -4(r1), r9 |
---|
68 | l.sb -2(r1), r8 |
---|
69 | l.lwz r12, -4(r1) |
---|
70 | |
---|
71 | l.sfeq r11, r3 |
---|
72 | l.bnf _end_ko |
---|
73 | l.nop |
---|
74 | |
---|
75 | l.exthz r11, r3 |
---|
76 | l.sfeq r10, r11 |
---|
77 | l.bnf _end_ko |
---|
78 | l.nop |
---|
79 | |
---|
80 | l.sfeq r12, r4 |
---|
81 | l.bnf _end_ko |
---|
82 | l.nop |
---|
83 | |
---|
84 | l.addi r3, r3, 1 |
---|
85 | l.rori r3, r3, 1 |
---|
86 | l.addi r4, r4, 1 |
---|
87 | l.rori r4, r4, 1 |
---|
88 | |
---|
89 | _loop1_store_test : |
---|
90 | l.sfeq r20, r2 |
---|
91 | l.bnf _loop1_store_body |
---|
92 | l.addi r20, r20, 1 |
---|
93 | |
---|
94 | /* end test */ |
---|
95 | l.j _end_ok |
---|
96 | l.nop |
---|