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.6 KB
|
Line | |
---|
1 | /* |
---|
2 | * Test_014 |
---|
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.andi |
---|
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 | A (r1) B (I) - D (r3 wait) |
---|
37 | (r4) |
---|
38 | 1) 0x0f0f0f0f 0x00ff - 0x0000000f |
---|
39 | 1) 0x0f0f0f0f 0xff00 - 0x00000f00 |
---|
40 | */ |
---|
41 | |
---|
42 | /**********/ |
---|
43 | /* Test 1 */ |
---|
44 | /**********/ |
---|
45 | l.movhi r1, hi(0x0f0f0f0f) /* RA */ |
---|
46 | l.ori r1, r1, lo(0x0f0f0f0f) |
---|
47 | l.movhi r3, hi(0x0000000f) /* RD wait */ |
---|
48 | l.ori r3, r3, lo(0x0000000f) |
---|
49 | |
---|
50 | l.andi r4, r1, 0x00ff |
---|
51 | |
---|
52 | /* Test result */ |
---|
53 | l.sfeq r3, r4 |
---|
54 | l.bnf _end_ko |
---|
55 | l.nop |
---|
56 | |
---|
57 | /**********/ |
---|
58 | /* Test 2 */ |
---|
59 | /**********/ |
---|
60 | l.movhi r1, hi(0x0f0f0f0f) /* RA */ |
---|
61 | l.ori r1, r1, lo(0x0f0f0f0f) |
---|
62 | l.movhi r3, hi(0x00000f00) /* RD wait */ |
---|
63 | l.ori r3, r3, lo(0x00000f00) |
---|
64 | |
---|
65 | l.andi r4, r1, 0xff00 |
---|
66 | |
---|
67 | /* Test result */ |
---|
68 | l.sfeq r3, r4 |
---|
69 | l.bnf _end_ko |
---|
70 | l.nop |
---|
71 | |
---|
72 | /**********/ |
---|
73 | /* End */ |
---|
74 | /**********/ |
---|
75 | |
---|
76 | l.j _end_ok |
---|
77 | l.nop |
---|
Note: See
TracBrowser
for help on using the repository browser.