|
|
Power 6/32 Unix version 1.21
1 00000000 LL0:
2 00000000 .data
3 000001dc * .text
4 00000000 .align 1
5 00000000 .globl _ovfl_test
6 00000000 _ovfl_test:
7 0000DE50 0000 .word L381
8 0000DE52 #
9 0000DE52 # #include "evt_defs.h"
10 0000DE52 #
11 0000DE52 # /*
12 0000DE52 # ********************************************************************
13 0000DE52 # *
14 0000DE52 # * MONITOR FOR THE FPP OVERFLOW EVENT TEST
15 0000DE52 # *
16 0000DE52 # * 25-Mar-85 JJM: written
17 0000DE52 # *
18 0000DE52 # ********************************************************************
19 0000DE52 # */
20 0000DE52 # ovfl_test()
21 0000DE52 # {
22 0000DE52 13 00b2 jbr L383
23 0000DE55 L384:
24 0000DE55 # event_msg = "Overflow";
25 0000DE55 .data 1
26 000001dc * L385:
27 000001dc * 4F766572666C6F7700 .ascii "Overflow\0"
28 000001e5 * .text
29 0000DE55 0d 8f000001dc effffffff0 movl $L385,_event_msg
30 0000DE60 # test_event = ARITH_CODE; /* expect an arithmetic fault */
31 0000DE60 0d 34 efffffffe9 movl $52,_test_event
32 0000DE67 # exp_code = FLT_OVFL_CODE; /* -specificly floating overflow */
33 0000DE67 0d 04 efffffffe2 movl $4,_exp_code
34 0000DE6E # disable_mask = 0; /* don't disable any events */
35 0000DE6E 4b efffffffdc clrw _disable_mask
36 0000DE74 # evt_disabled = FALSE;
37 0000DE74 4d efffffffd6 clrl _evt_disabled
38 0000DE7A # if( evt_inst ) /* was the op-code specified? */
39 0000DE7A 5d efffffffd0 tstl _evt_inst
40 0000DE80 31 62 jeql L386
41 0000DE82 # {
42 0000DE82 # inst_index = get_ovfl_index( evt_inst );
43 0000DE82 dd efffffffc8 pushl _evt_inst
44 0000DE88 fe 08 ef0000015b callf $8,_get_ovfl_index
45 0000DE8F 0d 50 efffffffba movl r0,_inst_index
46 0000DE96 # if( inst_index < 0 ) /* valid instruction for OVFL? */
47 0000DE96 5d efffffffb4 tstl _inst_index
48 0000DE9C 81 3d jgeq L388
49 0000DE9E # {
50 0000DE9E # if( (prt_hdrs) && (cycle == 1) ) /* not a valid instr */
51 0000DE9E 5d efffffffac tstl _prt_hdrs
52 0000DEA4 31 33 jeql L389
53 0000DEA6 1d efffffffa4 01 cmpl _cycle,$1
54 0000DEAD 21 2a jneq L389
55 0000DEAF # {
56 0000DEAF # writes(
57 0000DEAF # "There are no floating OVERFLOW faults with op-code ");
58 0000DEAF .data 1
59 000001e5 * L391:
60 000001e5 * 546865726520617265206E6F2 .ascii "There are no floating OVERFLOW faults with op-code \0"
0666C6F6174696E67204F5645
52464C4F57206661756C74732
077697468206F702D636F6465
2000
61 00000219 * .text
62 0000DEAF dd 8f000001e5 pushl $L391
63 0000DEB5 fe 08 efffffff94 callf $8,_writes
64 0000DEBC # writeh( evt_inst );
65 0000DEBC dd efffffff8e pushl _evt_inst
66 0000DEC2 fe 08 efffffff87 callf $8,_writeh
67 0000DEC9 # writec('\n');
68 0000DEC9 dd 0a pushl $10
69 0000DECB fe 08 efffffff7e callf $8,_writec
70 0000DED2 # error = TRUE; /* needed for line feed control */
71 0000DED2 0d 01 efffffff77 movl $1,_error
72 0000DED9 # }
73 0000DED9 # } else
74 0000DED9 L389:
75 0000DED9 11 07 jbr L394
76 0000DEDB L388:
77 0000DEDB # test_ovfl_inst(); /* test the instruction */
78 0000DEDB fe 04 ef00000028 callf $4,_test_ovfl_inst
79 0000DEE2 L394:
80 0000DEE2 # } else /* the op-code wasn't specfied */
81 0000DEE2 11 22 jbr L396
82 0000DEE4 L386:
83 0000DEE4 # for(inst_index=0; inst_index < size_ovfl_tbl; inst_index++)
84 0000DEE4 4d efffffff66 clrl _inst_index
85 0000DEEA L399:
86 0000DEEA 1d efffffff60 efffffff5b cmpl _inst_index,_size_ovfl_tbl
87 0000DEF5 81 0f jgeq L398
88 0000DEF7 # test_ovfl_inst(); /* test each ovfl instruction */
89 0000DEF7 fe 04 ef0000000c callf $4,_test_ovfl_inst
90 0000DEFE L397:
91 0000DEFE 6d efffffff4c incl _inst_index
92 0000DF04 11 e4 jbr L399
93 0000DF06 L398:
94 0000DF06 L396:
95 0000DF06 # }
96 0000DF06 40 ret#2
97 0000DF07 .set L381,0x0
98 0000DF07 L383:
99 0000DF07 13 ff4b jbr L384
100 0000DF0A .data
101 000001dc * .text
102 0000DF0A .align 1
103 0000DF0A .globl _test_ovfl_inst
104 0000DF0A _test_ovfl_inst:
105 0000DF0A 0000 .word L400
106 0000DF0C #
107 0000DF0C #
108 0000DF0C # /*
109 0000DF0C # ********************************************************************
110 0000DF0C # *
111 0000DF0C # * test the floating overflow event on an instruction
112 0000DF0C # *
113 0000DF0C # ********************************************************************
114 0000DF0C # */
115 0000DF0C # test_ovfl_inst()
116 0000DF0C # {
117 0000DF0C 13 00d7 jbr L402
118 0000DF0F L403:
119 0000DF0F # valid_test = TRUE; /* a test is being run */
120 0000DF0F 0d 01 efffffff3a movl $1,_valid_test
121 0000DF16 # op_code = ovfl_tbl[ inst_index ].inst_code;
122 0000DF16 0d efffffff34 50 movl _inst_index,r0
123 0000DF1D 48 05 50 50 shll $5,r0,r0
124 0000DF21 0d e000000000 efffffff24 movl _ovfl_tbl(r0),_op_code
125 0000DF2C # op_name = ovfl_tbl[ inst_index ].name;
126 0000DF2C 0d efffffff1e 50 movl _inst_index,r0
127 0000DF33 48 05 50 50 shll $5,r0,r0
128 0000DF37 0d e000000004 efffffff0e movl _ovfl_tbl+4(r0),_op_name
129 0000DF42 # no_ops = ovfl_tbl[ inst_index ].no_operands;
130 0000DF42 0d efffffff08 50 movl _inst_index,r0
131 0000DF49 48 05 50 50 shll $5,r0,r0
132 0000DF4D 0d e000000008 effffffef8 movl _ovfl_tbl+8(r0),_no_ops
133 0000DF58 # precision = ovfl_tbl[ inst_index ].precision;
134 0000DF58 0d effffffef2 50 movl _inst_index,r0
135 0000DF5F 48 05 50 50 shll $5,r0,r0
136 0000DF63 0d e00000000c effffffee2 movl _ovfl_tbl+12(r0),_precision
137 0000DF6E # data_ptr = ovfl_tbl[ inst_index ].ovfl_data;
138 0000DF6E 0d effffffedc 50 movl _inst_index,r0
139 0000DF75 48 05 50 50 shll $5,r0,r0
140 0000DF79 0d e000000010 effffffecc movl _ovfl_tbl+16(r0),_data_ptr
141 0000DF84 # max_index = *ovfl_tbl[ inst_index ].ovfl_cnt;
142 0000DF84 0d effffffec6 50 movl _inst_index,r0
143 0000DF8B 48 05 50 50 shll $5,r0,r0
144 0000DF8F 0d f000000014 effffffeb6 movl *_ovfl_tbl+20(r0),_max_index
145 0000DF9A # if( precision == SGL ) {
146 0000DF9A 1d effffffeb0 01 cmpl _precision,$1
147 0000DFA1 21 10 jneq L404
148 0000DFA3 # sgl_op = TRUE;
149 0000DFA3 0d 01 effffffea6 movl $1,_sgl_op
150 0000DFAA # acc_ld_size = SGL; /* use a sgl precision Acc. */
151 0000DFAA 0d 01 effffffe9f movl $1,_acc_ld_size
152 0000DFB1 # } else {
153 0000DFB1 11 0d jbr L405
154 0000DFB3 L404:
155 0000DFB3 # sgl_op = FALSE;
156 0000DFB3 4d effffffe97 clrl _sgl_op
157 0000DFB9 # acc_ld_size = DBL; /* use a dbl precision Acc. */
158 0000DFB9 0d 02 effffffe90 movl $2,_acc_ld_size
159 0000DFC0 # }
160 0000DFC0 L405:
161 0000DFC0 # if( (prt_hdrs) && (cycle == 1) )
162 0000DFC0 5d effffffe8a tstl _prt_hdrs
163 0000DFC6 31 16 jeql L406
164 0000DFC8 1d effffffe82 01 cmpl _cycle,$1
165 0000DFCF 21 0d jneq L406
166 0000DFD1 # writes( op_name );
167 0000DFD1 dd effffffe79 pushl _op_name
168 0000DFD7 fe 08 effffffe72 callf $8,_writes
169 0000DFDE # test_inst();
170 0000DFDE L406:
171 0000DFDE fe 04 effffffe6b callf $4,_test_inst
172 0000DFE5 # }
173 0000DFE5 40 ret#2
174 0000DFE6 .set L400,0x0
175 0000DFE6 L402:
176 0000DFE6 13 ff26 jbr L403
177 0000DFE9 .data
178 000001dc * .text
179 0000DFE9 00 .align 1
180 0000DFEA .globl _get_ovfl_index
181 0000DFEA _get_ovfl_index:
182 0000DFEA 0000 .word L408
183 0000DFEC #
184 0000DFEC #
185 0000DFEC #
186 0000DFEC #
187 0000DFEC # /*
188 0000DFEC # ***************************************************************************
189 0000DFEC # *
190 0000DFEC # * GET THE OVERFLOW / UNDERFLOW INSTRUCTION TABLE INDEX FOR AN OP-CODE
191 0000DFEC # *
192 0000DFEC # * Given the op_code of an instruction, return the instruction's index in
193 0000DFEC # * the overflow / underflow instruction table. Return a negative number
194 0000DFEC # * if the op-code isn't in the table.
195 0000DFEC # *
196 0000DFEC # **************************************************************************
197 0000DFEC # */
198 0000DFEC # get_ovfl_index( op_code )
199 0000DFEC # {
200 0000DFEC 11 38 jbr L410
201 0000DFEE L411:
202 0000DFEE # int x;
203 0000DFEE # x = 0;
204 0000DFEE 4d adc8 clrl -56(fp)
205 0000DFF1 # while( (ovfl_tbl[x].inst_code != op_code) && (x < size_ovfl_tbl) )
206 0000DFF1 L412:
207 0000DFF1 0d adc8 50 movl -56(fp),r0
208 0000DFF5 48 05 50 50 shll $5,r0,r0
209 0000DFF9 1d e000000000 ad04 cmpl _ovfl_tbl(r0),4(fp)
210 0000E001 31 0f jeql L413
211 0000E003 1d adc8 effffffe45 cmpl -56(fp),_size_ovfl_tbl
212 0000E00B 81 05 jgeq L413
213 0000E00D # x++;
214 0000E00D 6d adc8 incl -56(fp)
215 0000E010 11 df jbr L412
216 0000E012 L413:
217 0000E012 # if( x == size_ovfl_tbl )
218 0000E012 1d adc8 effffffe36 cmpl -56(fp),_size_ovfl_tbl
219 0000E01A 21 04 jneq L414
220 0000E01C # x = -1;
221 0000E01C ec 01 adc8 mnegl $1,-56(fp)
222 0000E020 # return( x );
223 0000E020 L414:
224 0000E020 0d adc8 50 movl -56(fp),r0
225 0000E024 40 ret#1
226 0000E025 # }
227 0000E025 40 ret#1
228 0000E026 .set L408,0x0
229 0000E026 L410:
230 0000E026 3c 38 5d 5e subl3 $56,fp,sp
231 0000E02A 11 c2 jbr L411
232 000001dc * .data
233 000001dc * #
234 000001dc * #
234 000001dc * #
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.