|
|
1.1 root 1: .data
2: .align 2
3: _sccsid:.data 2
4: L12:.ascii "@(#)gmon.c\11"
5: .ascii "2.0 (Tahoe) 3/20/85\0"
6: .data
7: .long L12
8: .align 2
9: _profiling:.long 3
10: .lcomm _froms,4
11: .align 2
12: _tos:.long 0
13: .align 2
14: _tolimit:.long 0
15: .align 2
16: _s_lowpc:.long 0
17: .align 2
18: _s_highpc:.long 0
19: .align 2
20: _s_textsize:.long 0
21: .lcomm _ssiz,4
22: .lcomm _sbuf,4
23: .lcomm _s_scale,4
24: .text
25: LL0:.align 1
26: .globl _monstartup
27: .data 1
28: L32:.ascii "No space for monitor buffer(s)\12\0"
29: .text
30: .data 1
31: L33:.ascii "No space for monitor buffer(s)\12\0"
32: .text
33: .data 1
34: L35:.ascii "No space for monitor buffer(s)\12\0"
35: .text
36: .data 1
37: L36:.ascii "No space for monitor buffer(s)\12\0"
38: .text
39: .data 1
40: L41:.ascii "No space for monitor buffer(s)\12\0"
41: .text
42: .data 1
43: L42:.ascii "No space for monitor buffer(s)\12\0"
44: .text
45: .set L24,0x0
46: .data
47: .text
48: _monstartup:.word L24
49: subl3 $60,fp,sp
50: pushl $4
51: pushl 4(fp)
52: callf $12,udiv
53: shll $2,r0,4(fp)
54: movl 4(fp),_s_lowpc
55: pushl $4
56: addl3 $3,8(fp),-(sp)
57: callf $12,udiv
58: shll $2,r0,8(fp)
59: movl 8(fp),_s_highpc
60: subl3 4(fp),8(fp),_s_textsize
61: pushl $2
62: pushl _s_textsize
63: callf $12,udiv
64: addl3 $12,r0,-56(fp)
65: addl3 $3,-56(fp),r0
66: andl3 $-4,r0,-56(fp)
67: pushl -56(fp)
68: callf $8,_sbrk
69: movl r0,-60(fp)
70: cmpl r0,$-1
71: jneq L30
72: pushl $32
73: pushl $L32
74: pushl $2
75: callf $16,_write
76: ret#2
77: L30:pushl _s_textsize
78: callf $8,_sbrk
79: movl r0,_froms
80: cmpl r0,$-1
81: jneq L34
82: pushl $32
83: pushl $L35
84: pushl $2
85: callf $16,_write
86: clrl _froms
87: ret#2
88: L34:pushl $100
89: addl3 _s_textsize,_s_textsize,-(sp)
90: callf $12,udiv
91: movl r0,_tolimit
92: cmpl r0,$50
93: jgeq L37
94: movl $50,_tolimit
95: jbr L38
96: L37:cmpl _tolimit,$65534
97: jleq L38
98: movl $65534,_tolimit
99: L38:mull3 $12,_tolimit,r0
100: addl2 $3,r0
101: andl3 $-4,r0,-(sp)
102: callf $8,_sbrk
103: movl r0,_tos
104: cmpl r0,$-1
105: jneq L40
106: pushl $32
107: pushl $L41
108: pushl $2
109: callf $16,_write
110: clrl _froms
111: clrl _tos
112: ret#2
113: L40:pushl $0
114: callf $8,_sbrk
115: movl r0,minbrk
116: movl _tos,r0
117: clrw 8(r0)
118: pushl _tolimit
119: pushl -56(fp)
120: pushl -60(fp)
121: pushl 8(fp)
122: pushl 4(fp)
123: callf $24,_monitor
124: ret#2
125: .align 1
126: .globl __mcleanup
127: .data 1
128: L50:.ascii "gmon.out\0"
129: .text
130: .data 1
131: L53:.ascii "mcount: gmon.out\0"
132: .text
133: .set L45,0x0
134: .data
135: .text
136: __mcleanup:.word L45
137: subl3 $84,fp,sp
138: pushl $438
139: pushl $L50
140: callf $12,_creat
141: movl r0,-56(fp)
142: tstl r0
143: jgeq L51
144: pushl $L53
145: callf $8,_perror
146: ret#2
147: L51:pushl _ssiz
148: pushl _sbuf
149: pushl -56(fp)
150: callf $16,_write
151: pushl $2
152: pushl _s_textsize
153: callf $12,udiv
154: movl r0,-64(fp)
155: clrl -60(fp)
156: jbr L56
157: L2000003:movl -60(fp),r0
158: addl2 r0,r0
159: addl2 _froms,r0
160: tstw (r0)
161: jeql L54
162: addl3 -60(fp),-60(fp),r0
163: addl3 _s_lowpc,r0,-68(fp)
164: movl -60(fp),r0
165: addl2 r0,r0
166: addl2 _froms,r0
167: movzwl (r0),-72(fp)
168: jbr L60
169: L2000001:movl -68(fp),-84(fp)
170: mull3 $12,-72(fp),r0
171: addl2 _tos,r0
172: movl (r0),-80(fp)
173: mull3 $12,-72(fp),r0
174: addl2 _tos,r0
175: movl 4(r0),-76(fp)
176: pushl $12
177: subl3 $84,fp,-(sp)
178: pushl -56(fp)
179: callf $16,_write
180: mull3 $12,-72(fp),r0
181: addl2 _tos,r0
182: movzwl 8(r0),-72(fp)
183: L60:tstl -72(fp)
184: jneq L2000001
185: L54:incl -60(fp)
186: L56:cmpl -60(fp),-64(fp)
187: jlss L2000003
188: pushl -56(fp)
189: callf $8,_close
190: ret#2
191: .align 1
192: .globl mcount
193: .data 1
194: L81:.ascii "mcount: tos overflow\12\0"
195: .text
196: .data 1
197: L82:.ascii "mcount: tos overflow\12\0"
198: .text
199: .set L63,0x1F0C
200: .data
201: .text
202: mcount:.word L63
203: movl -8(fp),r12
204: movl (fp),r0
205: movl -8(r0),r11
206: tstl _profiling
207: jneq L68
208: incl _profiling
209: subl3 _s_lowpc,r11,r0
210: movl r0,r11
211: cmpl r11,_s_textsize
212: jgtru L70
213: divl3 $2,r11,r0
214: addl2 r0,r0
215: addl3 _froms,r0,r11
216: movzwl (r11),r8
217: tstl r8
218: jneq L71
219: movl _tos,r0
220: incw 8(r0)
221: movzwl 8(r0),r8
222: cmpl r8,_tolimit
223: jgeq L73
224: cvtlw r8,(r11)
225: mull3 $12,r8,r0
226: addl2 _tos,r0
227: movl r0,r10
228: movl r12,(r10)
229: movl $1,4(r10)
230: clrw 8(r10)
231: jbr L70
232: L2000005:incl 4(r10)
233: jbr L70
234: L2000007:movl _tos,r0
235: incw 8(r0)
236: movzwl 8(r0),r8
237: cmpl r8,_tolimit
238: jgeq L73
239: mull3 $12,r8,r0
240: addl2 _tos,r0
241: movl r0,r10
242: movl r12,(r10)
243: movl $1,4(r10)
244: L2000009:movw (r11),8(r10)
245: cvtlw r8,(r11)
246: L70:decl _profiling
247: L68:ret#2
248: L71:mull3 $12,r8,r0
249: addl2 _tos,r0
250: movl r0,r10
251: cmpl (r10),r12
252: jeql L2000005
253: L77:tstw 8(r10)
254: jeql L2000007
255: movl r10,r9
256: movzwl 8(r10),r0
257: emul $12,r0,$0,r2
258: movl r3,r0
259: addl2 _tos,r0
260: movl r0,r10
261: cmpl (r10),r12
262: jneq L77
263: incl 4(r10)
264: movzwl 8(r9),r8
265: movw 8(r10),8(r9)
266: jbr L2000009
267: L73:pushl $22
268: pushl $L81
269: pushl $2
270: callf $16,_write
271: jbr L68
272: .align 1
273: .globl _monitor
274: .data
275: .align 2
276: L91:.long 0x48800000, 0x00000000 # .double 65536
277: .text
278: .set L83,0x100C
279: .data
280: .text
281: _monitor:.word L83
282: tstl 4(fp)
283: jneq L87
284: pushl $0
285: callf $8,_moncontrol
286: callf $4,__mcleanup
287: ret#2
288: L87:movl 12(fp),_sbuf
289: movl 16(fp),_ssiz
290: movl 4(fp),*12(fp)
291: movl 12(fp),r0
292: movl 8(fp),4(r0)
293: movl 12(fp),r0
294: movl _ssiz,8(r0)
295: subl2 $12,16(fp)
296: jgtr L89
297: ret#2
298: L89:subl3 4(fp),8(fp),r12
299: cmpl 16(fp),r12
300: jgeq L90
301: cvlf 16(fp)
302: stf r0
303: clrl r1
304: cvld r12
305: std r2
306: ldd r0
307: divd r2
308: muld L91
309: cvdl _s_scale
310: jbr L92
311: L90:movl $65536,_s_scale
312: L92:pushl $1
313: callf $8,_moncontrol
314: ret#2
315: .align 1
316: .globl _moncontrol
317: .set L93,0x0
318: .data
319: .text
320: _moncontrol:.word L93
321: tstl 4(fp)
322: jeql L97
323: pushl _s_scale
324: pushl _s_lowpc
325: subl3 $12,_ssiz,-(sp)
326: addl3 $12,_sbuf,-(sp)
327: callf $20,_profil
328: clrl _profiling
329: jbr L99
330: L97:pushl $0
331: pushl $0
332: pushl $0
333: pushl $0
334: callf $20,_profil
335: movl $3,_profiling
336: L99:ret#2
337:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.