|
|
1.1 root 1: /* file: Ksqrtf.x
2: */
3: .data
4: .comm _errno,4
5: .text
6: LL0: .align 1
7: .globl _Ksqrtf
8: .data
9: .align 2
10: L22: .long 0x40000000, 0x00000000 # .double .5
11: .text
12: .data
13: .align 2
14: L23: .long 0x41000000, 0x00000000 # .double 2
15: .text
16: .data
17: .align 2
18: L25: .long 0x41000000, 0x00000000 # .double 2
19: .text
20: .data
21: .align 2
22: L26: .long 0x40000000, 0x00000000 # .double .5
23: .align 2
24: L27: .long 0x40800000, 0x00000000 # .double 1
25: .text
26: .data
27: .align 2
28: L30: .long 0x4F800000, 0x00000000 # .double 1073741824
29: .text
30: .data
31: .align 2
32: L33: .long 0x4F800000, 0x00000000 # .double 1073741824
33: .text
34: .data
35: .align 2
36: L39: .long 0x40000000, 0x00000000 # .double .5
37: .text
38: .set L14,0x0
39: .data
40: .text
41: _Ksqrtf: .word L14
42: subl3 $76,fp,sp
43: tstl 4(fp) # if (arg <= 0.) {
44: jgtr L18
45: jgeq L19 # if (arg < 0.)
46: movl $33,_errno # errno = EDOM;
47: L19: clrl r1
48: clrl r0
49: ret # return(0.);}
50: L18:
1.1.1.2 ! root 51: pushal 20(fp) # hfs
1.1 root 52: subl3 $72,fp,-(sp)
53: pushl 8(fp)
54: pushl 4(fp)
55: callf $20,_Kfrexpf
56: clrl -60+4(fp)
57: movl r0,-60(fp) # x = frexp(arg,&exp);
58: jbr L20
59: L2000001:
1.1.1.2 ! root 60: pushal 20(fp) # hfs
1.1 root 61: ldd L23
62: pushd
63: ldd -60(fp)
64: pushd
65: callf $24,_Kmuld # x * 2
66: ldd r0
67: std -60(fp) # x *= 2;
68: decl -72(fp) # exp--;}
69: L20: cmpd2 -60(fp),L22 # while(x < 0.5){
70: jlss L2000001
71: bitl $1,-72(fp) # if(exp & 1) {
72: jeql L24
1.1.1.2 ! root 73: pushal 20(fp) # hfs
1.1 root 74: ldd L25
75: pushd
76: ldd -60(fp)
77: pushd
78: callf $24,_Kmuld # x * 2
79: ldd r0
80: std -60(fp) # x *= 2;
81: decl -72(fp) # exp--;}
1.1.1.2 ! root 82: L24: pushal 20(fp) # hfs
1.1 root 83: ldd -60(fp)
84: pushd
85: ldd L27
86: pushd
87: callf $24,_Kaddd # (1.0+x)
1.1.1.2 ! root 88: pushal 20(fp) # hfs
1.1 root 89: ldd r0
90: pushd
91: ldd L26
92: pushd
93: callf $24,_Kmuld
94: ldd r0
95: std -68(fp) # temp=0.5*(1.0+x);
96: jbr L28
97: L2000003:
1.1.1.2 ! root 98: pushal 20(fp) # hfs
1.1 root 99: ldd L30
100: pushd
101: ldd -68(fp)
102: pushd
103: callf $24,_Kmuld # temp*(1L<<30)
104: ldd r0
105: std -68(fp) # temp *=(1L<<30);
106: subl2 $60,-72(fp) # exp -= 60;}
107: L28: cmpl -72(fp),$60 # while(exp > 60){
108: jleq L31
109: jbr L2000003
110: L2000005:
1.1.1.2 ! root 111: pushal 20(fp) # hfs
1.1 root 112: ldd L33
113: pushd
114: ldd -68(fp)
115: pushd
116: callf $24,_Kdivd
117: ldd r0
118: std -68(fp) # temp /= (1L<<30);
119: addl2 $60,-72(fp) # exp +=60;}
120: L31: cmpl -72(fp),$-60 # while(exp < -60) {
121: jlss L2000005
122: tstl -72(fp) # if(exp >=0)
123: jlss L34
124: divl3 $2,-72(fp),r0
125: shll r0,$1,r0
1.1.1.2 ! root 126: pushal 20(fp) # hfs
1.1 root 127: pushl $0
128: pushl r0
129: pushl $0
130: pushl $0
131: callf $24,_Kcvtld
1.1.1.2 ! root 132: pushal 20(fp) # hfs
1.1 root 133: ldd r0
134: pushd
135: ldd -68(fp)
136: pushd
137: callf $24,_Kmuld # temp * (1L <<(exp/2))
138: jbr L2000006 # temp *= 1L << (exp/2));
139: L34: mnegl -72(fp),r0 # -exp
140: divl2 $2,r0 # -exp/2
141: shll r0,$1,r0
1.1.1.2 ! root 142: pushal 20(fp) # hfs
1.1 root 143: pushl $0
144: pushl r0
145: pushl $0
146: pushl $0
147: callf $24,_Kcvtld
1.1.1.2 ! root 148: pushal 20(fp) # hfs
1.1 root 149: ldd r0
150: pushd
151: ldd -68(fp)
152: pushd
153: callf $24,_Kdivd # temp / (1L <<(-exp/2))
154: L2000006:
155: ldd r0
156: std -68(fp) # temp (*/)= 1L << (exp/2));
157: clrl -76(fp)
158: L2000008:
1.1.1.2 ! root 159: pushal 20(fp) # hfs
1.1 root 160: ldd -68(fp)
161: pushd
162: ldd 4(fp)
163: pushd
164: callf $24,_Kdivd
1.1.1.2 ! root 165: pushal 20(fp) # hfs
1.1 root 166: ldd r0
167: pushd
168: ldd -68(fp)
169: pushd
170: callf $24,_Kaddd
1.1.1.2 ! root 171: pushal 20(fp) # hfs
1.1 root 172: ldd r0
173: pushd
174: ldd L39
175: pushd
176: callf $24,_Kmuld
177: ldd r0
178: std -68(fp) # temp=0.5*(temp+arg/temp);
179: aobleq $3,-76(fp),L2000008
180: ldd -68(fp)
181: cvdf
182: stf r0
183: ret
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.