|
|
Power 6/32 Unix version 1.21
1 00000000 LL0:
2 00000000 .data
3 0000027c * .text
4 00000000 .align 1
5 00000000 .globl _XTrap
6 00000000 _XTrap:
7 0000C5B4 1f00 .word L218
8 0000C5B6 # #include "fpp_defs.h"
9 0000C5B6 #
10 0000C5B6 # /*************************************************************************
11 0000C5B6 # *
12 0000C5B6 # * FLOATING POINT PROCESSOR EXCEPTION HANDLER
13 0000C5B6 # *
14 0000C5B6 # * This routine will be called after any trap or exception. It will
15 0000C5B6 # * compare the actual event type to any expected event type ( in
16 0000C5B6 # * _EXP_EVENT ). If no event was expected _EXP_EVENT will be = 0.
17 0000C5B6 # *
18 0000C5B6 # * If a previous error has set the FORCE_LOOP flag, then the test will exit
19 0000C5B6 # * through the loop address pointer without any event type checking.
20 0000C5B6 # * current subtest through _EVENT_RETURN.
21 0000C5B6 # *
22 0000C5B6 # * If the event was NOT it expected:
23 0000C5B6 # * if _PRT_ERROR is set, an error message will be printed.
24 0000C5B6 # * if _HALT_FLG is set, the program will halt.
25 0000C5B6 # * if _UNEXP_EVENT_RET is non-zero, it will contain the return address,
26 0000C5B6 # * or the program will return to the monitor via RETURN.
27 0000C5B6 # *
28 0000C5B6 # * The error message will be of the form:
29 0000C5B6 # * ** cycle: xx. test: xx. unexpected event type: xx
30 0000C5B6 # * ** Par0 : xxxxxxxx
31 0000C5B6 # * ** Par1 : xxxxxxxx
32 0000C5B6 # * ** PC : xxxxxxxx
33 0000C5B6 # * ** PSL : xxxxxxxx
34 0000C5B6 # *
35 0000C5B6 # *
36 0000C5B6 # * 30-Apr-85 combined 'fpp_event.s' and 'trap.c' into 'fpp_event.c'.
37 0000C5B6 # *
38 0000C5B6 # *************************************************************************/
39 0000C5B6 #
40 0000C5B6 # XTrap( code )
41 0000C5B6 # long code; /* event type code */
42 0000C5B6 # {
43 0000C5B6 13 026d jbr L220
44 0000C5B9 L221:
45 0000C5B9 # register long r12, r11, r10, r9, r8;
46 0000C5B9 # long tpc, tpsl;
47 0000C5B9 # if( force_loop ) /* check for continual looping */
48 0000C5B9 5d effffffff5 tstl _force_loop
49 0000C5BF 31 06 jeql L222
50 0000C5C1 # asm("jmp *_event_return");;
51 0000C5C1 71 ffffffffed jmp *_event_return
52 0000C5C7 L222:
53 0000C5C7 # asm("movl 8(fp),r12"); /* get par 0 */
54 0000C5C7 0d ad08 5c movl 8(fp),r12
55 0000C5CB # asm("movl 12(fp),r11"); /* get par 1 */
56 0000C5CB 0d ad0c 5b movl 12(fp),r11
57 0000C5CF # asm("movl 16(fp),r10"); /* get par 2 */
58 0000C5CF 0d ad10 5a movl 16(fp),r10
59 0000C5D3 # asm("movl 20(fp),r9"); /* get par 3 */
60 0000C5D3 0d ad14 59 movl 20(fp),r9
61 0000C5D7 # asm("movl 24(fp),r8"); /* get par 4 */
62 0000C5D7 0d ad18 58 movl 24(fp),r8
63 0000C5DB # if( code == ARITH_CODE ) {
64 0000C5DB 1d ad04 34 cmpl 4(fp),$52
65 0000C5DF 21 10 jneq L223
66 0000C5E1 # event_code = r12; /* set the arith fault type seen */
67 0000C5E1 0d 5c efffffffcc movl r12,_event_code
68 0000C5E8 # event_psl = r10; /* take the PSL off the stack */
69 0000C5E8 0d 5a efffffffc5 movl r10,_event_psl
70 0000C5EF # } else
71 0000C5EF 11 07 jbr L224
72 0000C5F1 L223:
73 0000C5F1 # event_psl = r11;; /* take the PSL off the stack */
74 0000C5F1 0d 5b efffffffbc movl r11,_event_psl
75 0000C5F8 L224:
76 0000C5F8 # if( code == exp_event ) { /* was the event expected? */
77 0000C5F8 1d ad04 efffffffb4 cmpl 4(fp),_exp_event
78 0000C600 21 18 jneq L225
79 0000C602 # if( (exp_event != ARITH_CODE) || (exp_code == r12) )
80 0000C602 1d efffffffac 34 cmpl _exp_event,$52
81 0000C609 21 09 jneq L9999
82 0000C60B 1d efffffffa3 5c cmpl _exp_code,r12
83 0000C612 21 06 jneq L226
84 0000C614 L9999:
85 0000C614 # asm("jmp *_event_return");; /* exit -the evt was expected */
86 0000C614 71 ffffffff9a jmp *_event_return
87 0000C61A L226:
88 0000C61A # }
89 0000C61A # /*
90 0000C61A # * If we get here then the event was not expected
91 0000C61A # */
92 0000C61A # errcnt++; /* bump the error count */
93 0000C61A L225:
94 0000C61A 6d efffffff94 incl _errcnt
95 0000C620 # if( prt_error ) {
96 0000C620 5d efffffff8e tstl _prt_error
97 0000C626 21 03 13 01b1 jeql L227
98 0000C62B # if( !error ) {
99 0000C62B 5d efffffff83 tstl _error
100 0000C631 21 10 jneq L228
101 0000C633 # error = TRUE; /* set current-error flag */
102 0000C633 0d 01 efffffff7a movl $1,_error
103 0000C63A # writec('\n');
104 0000C63A dd 0a pushl $10
105 0000C63C fe 08 efffffff71 callf $8,_writec
106 0000C643 # }
107 0000C643 # writes("\n** cycle: ");
108 0000C643 L228:
109 0000C643 .data 1
110 0000027c * L231:
111 0000027c * 0A2A2A206379636C653A2000 .ascii "\12** cycle: \0"
112 00000288 * .text
113 0000C643 dd 8f0000027c pushl $L231
114 0000C649 fe 08 efffffff64 callf $8,_writes
115 0000C650 # writed( cycle );
116 0000C650 dd efffffff5e pushl _cycle
117 0000C656 fe 08 efffffff57 callf $8,_writed
118 0000C65D # writes(". test: ");
119 0000C65D .data 1
120 00000288 * L233:
121 00000288 * 2E20746573743A2000 .ascii ". test: \0"
122 00000291 * .text
123 0000C65D dd 8f00000288 pushl $L233
124 0000C663 fe 08 efffffff4a callf $8,_writes
125 0000C66A # writeh( test_no );
126 0000C66A dd efffffff44 pushl _test_no
127 0000C670 fe 08 efffffff3d callf $8,_writeh
128 0000C677 # writes(". unexpected event -type: ");
129 0000C677 .data 1
130 00000291 * L235:
131 00000291 * 2E20756E65787065637465642 .ascii ". unexpected event -type: \0"
06576656E74202D747970653A
2000
132 000002ac * .text
133 0000C677 dd 8f00000291 pushl $L235
134 0000C67D fe 08 efffffff30 callf $8,_writes
135 0000C684 # writeh( code );
136 0000C684 dd ad04 pushl 4(fp)
137 0000C687 fe 08 efffffff26 callf $8,_writeh
138 0000C68E # writec('\n');
139 0000C68E dd 0a pushl $10
140 0000C690 fe 08 efffffff1d callf $8,_writec
141 0000C697 # if( code==0x37 ) { /* FPP Emulation trap */
142 0000C697 1d ad04 37 cmpl 4(fp),$55
143 0000C69B 21 68 jneq L236
144 0000C69D # writes("** Par 0 : "); write32h(r12); writec('\n');
145 0000C69D .data 1
146 000002ac * L237:
147 000002ac * 2A2A205061722030203A20200 .ascii "** Par 0 : \0"
0
148 000002b9 * .text
149 0000C69D dd 8f000002ac pushl $L237
150 0000C6A3 fe 08 efffffff0a callf $8,_writes
151 0000C6AA dd 5c pushl r12
152 0000C6AC fe 08 efffffff01 callf $8,_write32h
153 0000C6B3 dd 0a pushl $10
154 0000C6B5 fe 08 effffffef8 callf $8,_writec
155 0000C6BC # writes("** Par 1 : "); write32h(r11); writec('\n');
156 0000C6BC .data 1
157 000002b9 * L239:
158 000002b9 * 2A2A205061722031203A20200 .ascii "** Par 1 : \0"
0
159 000002c6 * .text
160 0000C6BC dd 8f000002b9 pushl $L239
161 0000C6C2 fe 08 effffffeeb callf $8,_writes
162 0000C6C9 dd 5b pushl r11
163 0000C6CB fe 08 effffffee2 callf $8,_write32h
164 0000C6D2 dd 0a pushl $10
165 0000C6D4 fe 08 effffffed9 callf $8,_writec
166 0000C6DB # writes("** Par 2 : "); write32h(r10); writec('\n');
167 0000C6DB .data 1
168 000002c6 * L240:
169 000002c6 * 2A2A205061722032203A20200 .ascii "** Par 2 : \0"
0
170 000002d3 * .text
171 0000C6DB dd 8f000002c6 pushl $L240
172 0000C6E1 fe 08 effffffecc callf $8,_writes
173 0000C6E8 dd 5a pushl r10
174 0000C6EA fe 08 effffffec3 callf $8,_write32h
175 0000C6F1 dd 0a pushl $10
176 0000C6F3 fe 08 effffffeba callf $8,_writec
177 0000C6FA # tpc = r9;
178 0000C6FA 0d 59 adc8 movl r9,-56(fp)
179 0000C6FE # tpsl = r8;
180 0000C6FE 0d 58 adc4 movl r8,-60(fp)
181 0000C702 # } else
182 0000C702 13 0097 jbr L241
183 0000C705 L236:
184 0000C705 # if( (code==0x20) || /* bus error */
185 0000C705 # (code==0x2f) || /* access control violation */
186 0000C705 # (code==0x30) ) { /* page fault */
187 0000C705 1d ad04 20 cmpl 4(fp),$32
188 0000C709 31 0c jeql L9998
189 0000C70B 1d ad04 2f cmpl 4(fp),$47
190 0000C70F 31 06 jeql L9998
191 0000C711 1d ad04 30 cmpl 4(fp),$48
192 0000C715 21 48 jneq L242
193 0000C717 L9998:
194 0000C717 # writes("** Par 0 : "); write32h(r12); writec('\n');
195 0000C717 .data 1
196 000002d3 * L243:
197 000002d3 * 2A2A205061722030203A20200 .ascii "** Par 0 : \0"
0
198 000002e0 * .text
199 0000C717 dd 8f000002d3 pushl $L243
200 0000C71D fe 08 effffffe90 callf $8,_writes
201 0000C724 dd 5c pushl r12
202 0000C726 fe 08 effffffe87 callf $8,_write32h
203 0000C72D dd 0a pushl $10
204 0000C72F fe 08 effffffe7e callf $8,_writec
205 0000C736 # writes("** Par 1 : "); write32h(r11); writec('\n');
206 0000C736 .data 1
207 000002e0 * L244:
208 000002e0 * 2A2A205061722031203A20200 .ascii "** Par 1 : \0"
0
209 000002ed * .text
210 0000C736 dd 8f000002e0 pushl $L244
211 0000C73C fe 08 effffffe71 callf $8,_writes
212 0000C743 dd 5b pushl r11
213 0000C745 fe 08 effffffe68 callf $8,_write32h
214 0000C74C dd 0a pushl $10
215 0000C74E fe 08 effffffe5f callf $8,_writec
216 0000C755 # tpc = r10;
217 0000C755 0d 5a adc8 movl r10,-56(fp)
218 0000C759 # tpsl = r9;
219 0000C759 0d 59 adc4 movl r9,-60(fp)
220 0000C75D # } else
221 0000C75D 11 3d jbr L245
222 0000C75F L242:
223 0000C75F # if( (code==0x34) || /* arithmetic acception */
224 0000C75F # (code==0x2b) ) { /* Kcall */
225 0000C75F 1d ad04 34 cmpl 4(fp),$52
226 0000C763 31 06 jeql L9997
227 0000C765 1d ad04 2b cmpl 4(fp),$43
228 0000C769 21 29 jneq L246
229 0000C76B L9997:
230 0000C76B # writes("** Par. : ");
231 0000C76B .data 1
232 000002ed * L247:
233 000002ed * 2A2A205061722E20203A20200 .ascii "** Par. : \0"
0
234 000002fa * .text
235 0000C76B dd 8f000002ed pushl $L247
236 0000C771 fe 08 effffffe3c callf $8,_writes
237 0000C778 # writeh(r12); writec('\n');
238 0000C778 dd 5c pushl r12
239 0000C77A fe 08 effffffe33 callf $8,_writeh
240 0000C781 dd 0a pushl $10
241 0000C783 fe 08 effffffe2a callf $8,_writec
242 0000C78A # tpc = r11;
243 0000C78A 0d 5b adc8 movl r11,-56(fp)
244 0000C78E # tpsl = r10;
245 0000C78E 0d 5a adc4 movl r10,-60(fp)
246 0000C792 # } else {
247 0000C792 11 08 jbr L248
248 0000C794 L246:
249 0000C794 # tpc = r12;
250 0000C794 0d 5c adc8 movl r12,-56(fp)
251 0000C798 # tpsl = r11;
252 0000C798 0d 5b adc4 movl r11,-60(fp)
253 0000C79C # }
254 0000C79C L248:
255 0000C79C L245:
256 0000C79C L241:
257 0000C79C # writes("** PC : "); write32h(tpc); writec('\n');
258 0000C79C .data 1
259 000002fa * L249:
260 000002fa * 2A2A205043202020203A20200 .ascii "** PC : \0"
0
261 00000307 * .text
262 0000C79C dd 8f000002fa pushl $L249
263 0000C7A2 fe 08 effffffe0b callf $8,_writes
264 0000C7A9 dd adc8 pushl -56(fp)
265 0000C7AC fe 08 effffffe01 callf $8,_write32h
266 0000C7B3 dd 0a pushl $10
267 0000C7B5 fe 08 effffffdf8 callf $8,_writec
268 0000C7BC # writes("** PSL : "); write32h(tpsl); writec('\n');
269 0000C7BC .data 1
270 00000307 * L250:
271 00000307 * 2A2A2050534C2020203A20200 .ascii "** PSL : \0"
0
272 00000314 * .text
273 0000C7BC dd 8f00000307 pushl $L250
274 0000C7C2 fe 08 effffffdeb callf $8,_writes
275 0000C7C9 dd adc4 pushl -60(fp)
276 0000C7CC fe 08 effffffde1 callf $8,_write32h
277 0000C7D3 dd 0a pushl $10
278 0000C7D5 fe 08 effffffdd8 callf $8,_writec
279 0000C7DC # }
280 0000C7DC # if( halt_flg ) { /* halt on the error? */
281 0000C7DC L227:
282 0000C7DC 5d effffffdd2 tstl _halt_flg
283 0000C7E2 31 2b jeql L251
284 0000C7E4 # asm("movl _test_no,r0"); /* r0 = test number */
285 0000C7E4 0d effffffdca 50 movl _test_no,r0
286 0000C7EB # asm("clrl r1"); /* r1 = 0 (subtest #) */
287 0000C7EB 4d 51 clrl r1
288 0000C7ED # asm("movl _event_type,r2"); /* r2 = event code */
289 0000C7ED 0d effffffdc1 52 movl _event_type,r2
290 0000C7F4 # asm("movl _cycle,r3"); /* r3 = cycle count */
291 0000C7F4 0d effffffdba 53 movl _cycle,r3
292 0000C7FB # asm("movl r12,r4"); /* r4 = parameter 1 */
293 0000C7FB 0d 5c 54 movl r12,r4
294 0000C7FE # asm("movl r11,r5"); /* r5 = parameter 2 */
295 0000C7FE 0d 5b 55 movl r11,r5
296 0000C801 # asm("movl r10,r6"); /* r6 = parameter 3 */
297 0000C801 0d 5a 56 movl r10,r6
298 0000C804 # asm("movl r9,r7"); /* r7 = parameter 4 */
299 0000C804 0d 59 57 movl r9,r7
300 0000C807 # asm("movl _index,r8"); /* r8 = data index */
301 0000C807 0d effffffda7 58 movl _index,r8
302 0000C80E # asm("halt"); /* halt */
303 0000C80E 00 halt
304 0000C80F # }
305 0000C80F # if( unexp_event_ret )
306 0000C80F L251:
307 0000C80F 5d effffffd9f tstl _unexp_event_ret
308 0000C815 31 08 jeql L252
309 0000C817 # asm("jmp *_unexp_event_ret"); /* return to the test */
310 0000C817 71 fffffffd97 jmp *_unexp_event_ret
311 0000C81D # else
312 0000C81D 11 06 jbr L253
313 0000C81F L252:
314 0000C81F # asm("jmp *return");
315 0000C81F 71 fffffffd8f jmp *return
316 0000C825 L253:
317 0000C825 # }
318 0000C825 40 ret#2
319 0000C826 .set L218,0x1F00
320 0000C826 L220:
321 0000C826 3c 3c 5d 5e subl3 $60,fp,sp
322 0000C82A 13 fd8c jbr L221
323 0000C82D .data
323 00018DE1 .data
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.