Last change
on this file since 118 was
81,
checked in by rosiere, 16 years ago
|
- Finish Environment (and test)
- Continue predictor_unit
- Add external tools
- svn keyword "Id" set
|
-
Property svn:keywords set to
Id
|
File size:
3.9 KB
|
Line | |
---|
1 | /******************************************** |
---|
2 | * files : asm_015_shift_rotate.s |
---|
3 | * authors : Rosiere Mathieu |
---|
4 | * date : 2006/06/20 |
---|
5 | ******************************************** |
---|
6 | * input : - |
---|
7 | * output : 1 test OK |
---|
8 | * 0 test KO |
---|
9 | ******************************************** |
---|
10 | * test : |
---|
11 | * warning : instruction ok |
---|
12 | * l.addi |
---|
13 | * l.and |
---|
14 | * l.bnf |
---|
15 | * l.jal |
---|
16 | * l.jr |
---|
17 | * l.movhi |
---|
18 | * l.ori |
---|
19 | * l.sfeq |
---|
20 | ******************************************** |
---|
21 | */ |
---|
22 | .file "asm_015_shift_rotate.s" |
---|
23 | .section .text |
---|
24 | .align 4 |
---|
25 | |
---|
26 | .global _asm_015_shift_rotate |
---|
27 | _asm_015_shift_rotate : |
---|
28 | /* save context */ |
---|
29 | l.addi r1,r1,-16 |
---|
30 | l.sw 0 (r1),r20 |
---|
31 | l.sw 4 (r1),r21 |
---|
32 | l.sw 8 (r1),r22 |
---|
33 | l.sw 12(r1),r23 |
---|
34 | |
---|
35 | /* Return is KO (default)*/ |
---|
36 | l.and r11,r0,r0 |
---|
37 | |
---|
38 | l.movhi r20, 0x2b3c |
---|
39 | l.ori r20,r20,0x4d1a |
---|
40 | |
---|
41 | l.movhi r21, 0x1a2b |
---|
42 | l.ori r21,r21,0x3c4d |
---|
43 | l.rori r22,r21, 4 |
---|
44 | l.rori r22,r22, 2 |
---|
45 | l.rori r22,r22, 0 |
---|
46 | l.rori r22,r22, 3 |
---|
47 | l.rori r22,r22, 5 |
---|
48 | l.rori r22,r22, 7 |
---|
49 | l.rori r22,r22, 3 |
---|
50 | |
---|
51 | l.sfeq r20,r22 |
---|
52 | l.bnf _asm_015_shift_rotate_ko |
---|
53 | l.nop 1 |
---|
54 | |
---|
55 | l.movhi r21, 0x1a2b |
---|
56 | l.ori r21,r21,0x3c4d |
---|
57 | |
---|
58 | l.ori r23,r0,1 |
---|
59 | l.ror r22,r21,r23 |
---|
60 | l.and r23,r0,r0 |
---|
61 | l.ror r22,r22,r23 |
---|
62 | l.ori r23,r0,5 |
---|
63 | l.ror r22,r22,r23 |
---|
64 | l.ori r23,r0,2 |
---|
65 | l.ror r22,r22,r23 |
---|
66 | l.ori r23,r0,5 |
---|
67 | l.ror r22,r22,r23 |
---|
68 | l.ori r23,r0,3 |
---|
69 | l.ror r22,r22,r23 |
---|
70 | l.ori r23,r0,8 |
---|
71 | l.ror r22,r22,r23 |
---|
72 | l.sfeq r20,r22 |
---|
73 | l.bnf _asm_015_shift_rotate_ko |
---|
74 | l.nop 2 |
---|
75 | |
---|
76 | l.movhi r20, 0x4d00 |
---|
77 | l.ori r20,r20,0x0000 |
---|
78 | |
---|
79 | l.movhi r21, 0x1a2b |
---|
80 | l.ori r21,r21,0x3c4d |
---|
81 | |
---|
82 | l.slli r22,r21,4 |
---|
83 | l.slli r22,r22,0 |
---|
84 | l.slli r22,r22,10 |
---|
85 | l.slli r22,r22,7 |
---|
86 | l.slli r22,r22,3 |
---|
87 | l.sfeq r20,r22 |
---|
88 | l.bnf _asm_015_shift_rotate_ko |
---|
89 | l.nop 1 |
---|
90 | |
---|
91 | l.movhi r21, 0x1a2b |
---|
92 | l.ori r21,r21,0x3c4d |
---|
93 | |
---|
94 | l.ori r23,r0,4 |
---|
95 | l.sll r22,r21,r23 |
---|
96 | l.ori r23,r0,0 |
---|
97 | l.sll r22,r22,r23 |
---|
98 | l.ori r23,r0,10 |
---|
99 | l.sll r22,r22,r23 |
---|
100 | l.ori r23,r0,7 |
---|
101 | l.sll r22,r22,r23 |
---|
102 | l.ori r23,r0,3 |
---|
103 | l.sll r22,r22,r23 |
---|
104 | l.sfeq r20,r22 |
---|
105 | l.bnf _asm_015_shift_rotate_ko |
---|
106 | l.nop 1 |
---|
107 | |
---|
108 | l.movhi r20, 0x0000 |
---|
109 | l.ori r20,r20,0x001a |
---|
110 | |
---|
111 | l.movhi r21, 0x1a2b |
---|
112 | l.ori r21,r21,0x3c4d |
---|
113 | |
---|
114 | l.srli r22,r21,4 |
---|
115 | l.srli r22,r22,0 |
---|
116 | l.srli r22,r22,10 |
---|
117 | l.srli r22,r22,7 |
---|
118 | l.srli r22,r22,3 |
---|
119 | l.sfeq r20,r22 |
---|
120 | l.bnf _asm_015_shift_rotate_ko |
---|
121 | l.nop 1 |
---|
122 | |
---|
123 | l.movhi r21, 0x1a2b |
---|
124 | l.ori r21,r21,0x3c4d |
---|
125 | |
---|
126 | l.ori r23,r0,4 |
---|
127 | l.srl r22,r21,r23 |
---|
128 | l.ori r23,r0,0 |
---|
129 | l.srl r22,r22,r23 |
---|
130 | l.ori r23,r0,10 |
---|
131 | l.srl r22,r22,r23 |
---|
132 | l.ori r23,r0,7 |
---|
133 | l.srl r22,r22,r23 |
---|
134 | l.ori r23,r0,3 |
---|
135 | l.srl r22,r22,r23 |
---|
136 | l.sfeq r20,r22 |
---|
137 | l.bnf _asm_015_shift_rotate_ko |
---|
138 | l.nop 1 |
---|
139 | |
---|
140 | l.movhi r20, 0x0000 |
---|
141 | l.ori r20,r20,0x001a |
---|
142 | |
---|
143 | l.movhi r21, 0x1a2b |
---|
144 | l.ori r21,r21,0x3c4d |
---|
145 | |
---|
146 | l.srai r22,r21,4 |
---|
147 | l.srai r22,r22,0 |
---|
148 | l.srai r22,r22,10 |
---|
149 | l.srai r22,r22,7 |
---|
150 | l.srai r22,r22,3 |
---|
151 | l.sfeq r20,r22 |
---|
152 | l.bnf _asm_015_shift_rotate_ko |
---|
153 | l.nop 1 |
---|
154 | |
---|
155 | l.movhi r21, 0x1a2b |
---|
156 | l.ori r21,r21,0x3c4d |
---|
157 | |
---|
158 | l.ori r23,r0,4 |
---|
159 | l.sra r22,r21,r23 |
---|
160 | l.ori r23,r0,0 |
---|
161 | l.sra r22,r22,r23 |
---|
162 | l.ori r23,r0,10 |
---|
163 | l.sra r22,r22,r23 |
---|
164 | l.ori r23,r0,7 |
---|
165 | l.sra r22,r22,r23 |
---|
166 | l.ori r23,r0,3 |
---|
167 | l.sra r22,r22,r23 |
---|
168 | l.sfeq r20,r22 |
---|
169 | l.bnf _asm_015_shift_rotate_ko |
---|
170 | l.nop 1 |
---|
171 | |
---|
172 | l.movhi r20, 0xffff |
---|
173 | l.ori r20,r20,0xff8a |
---|
174 | |
---|
175 | l.movhi r21, 0x8a2b |
---|
176 | l.ori r21,r21,0x3c4d |
---|
177 | |
---|
178 | l.srai r22,r21,4 |
---|
179 | l.srai r22,r22,0 |
---|
180 | l.srai r22,r22,10 |
---|
181 | l.srai r22,r22,7 |
---|
182 | l.srai r22,r22,3 |
---|
183 | l.sfeq r20,r22 |
---|
184 | l.bnf _asm_015_shift_rotate_ko |
---|
185 | l.nop 1 |
---|
186 | |
---|
187 | l.movhi r21, 0x8a2b |
---|
188 | l.ori r21,r21,0x3c4d |
---|
189 | |
---|
190 | l.ori r23,r0,4 |
---|
191 | l.sra r22,r21,r23 |
---|
192 | l.ori r23,r0,0 |
---|
193 | l.sra r22,r22,r23 |
---|
194 | l.ori r23,r0,10 |
---|
195 | l.sra r22,r22,r23 |
---|
196 | l.ori r23,r0,7 |
---|
197 | l.sra r22,r22,r23 |
---|
198 | l.ori r23,r0,3 |
---|
199 | l.sra r22,r22,r23 |
---|
200 | l.sfeq r20,r22 |
---|
201 | l.bnf _asm_015_shift_rotate_ko |
---|
202 | l.nop 1 |
---|
203 | |
---|
204 | _asm_015_shift_rotate_ok : |
---|
205 | l.addi r11,r0,1 |
---|
206 | _asm_015_shift_rotate_ko : |
---|
207 | |
---|
208 | /* load context */ |
---|
209 | l.lwz r23,12(r1) |
---|
210 | l.lwz r22,8 (r1) |
---|
211 | l.lwz r21,4 (r1) |
---|
212 | l.lwz r20,0 (r1) |
---|
213 | l.jr r9 |
---|
214 | l.addi r1,r1,16 |
---|
Note: See
TracBrowser
for help on using the repository browser.