Last change
on this file since 112 was
102,
checked in by rosiere, 16 years ago
|
Previous commit with new files :P
|
-
Property svn:keywords set to
Id
|
File size:
1.7 KB
|
Line | |
---|
1 | /* |
---|
2 | * Test_029 |
---|
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.msync |
---|
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.msync |
---|
42 | |
---|
43 | l.movhi r2, hi(0xbebebeef) /* data */ |
---|
44 | l.ori r2, r2, lo(0xbebebeef) |
---|
45 | l.movhi r11, hi(0x00000010) /* iteration */ |
---|
46 | l.ori r11, r11, lo(0x00000010) |
---|
47 | |
---|
48 | l.and r3, r1, r1 |
---|
49 | l.and r4, r2, r2 |
---|
50 | l.j _loop1_test |
---|
51 | l.add r10, r0, r0 |
---|
52 | _loop1_do : |
---|
53 | l.sw 0(r3), r4 |
---|
54 | l.msync |
---|
55 | l.addi r3, r3,-4 |
---|
56 | l.addi r4, r4,+1 |
---|
57 | _loop1_test : |
---|
58 | l.sfeq r10, r11 |
---|
59 | l.bnf _loop1_do |
---|
60 | l.addi r10, r10, 1 |
---|
61 | |
---|
62 | |
---|
63 | l.and r3, r1, r1 |
---|
64 | l.and r4, r2, r2 |
---|
65 | l.j _loop2_test |
---|
66 | l.add r10, r0, r0 |
---|
67 | _loop2_do : |
---|
68 | l.lwz r5, 0(r3) |
---|
69 | l.msync |
---|
70 | l.sfeq r5, r4 |
---|
71 | l.bnf _end_ko |
---|
72 | l.nop |
---|
73 | l.addi r3, r3,-4 |
---|
74 | l.addi r4, r4,+1 |
---|
75 | _loop2_test : |
---|
76 | l.sfeq r10, r11 |
---|
77 | l.bnf _loop2_do |
---|
78 | l.addi r10, r10, 1 |
---|
79 | |
---|
80 | /* end test */ |
---|
81 | l.j _end_ok |
---|
82 | l.nop |
---|
Note: See
TracBrowser
for help on using the repository browser.