source: trunk/minix/lib/ack/float/div_ext.s@ 15

Last change on this file since 15 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 2.6 KB
Line 
1.sect .text; .sect .rom; .sect .data; .sect .bss
2.extern .div_ext
3.sect .text
4.div_ext:
5push ebp
6mov ebp,esp
7sub esp,20
8push esi
9push edi
10mov esi,8(ebp)
11o16 mov -2(ebp),0
12mov edx,12(ebp)
13mov ecx,12(ebp)
14mov ecx,8(ecx)
15or ecx,4(edx)
16jne I1_4
17push 7
18call __fptrp
19pop ecx
20xor edx,edx
21mov 8(esi),edx
22mov 4(esi),edx
23o16 mov 2(esi),16383
24jmp I1_1
25I1_4:
26mov edx,8(esi)
27or edx,4(esi)
28jne I1_7
29o16 mov 2(esi),0
30jmp I1_1
31I1_7:
32lea eax,4(esi)
33push eax
34call .b64_rsft
35pop ecx
36mov edx,12(ebp)
37! kill edx
38add edx,4
39push edx
40call .b64_rsft
41pop ecx
42movsx eax,2(esi)
43inc eax
44movsx eax,eax
45o16 mov 2(esi),eax
46mov edx,12(ebp)
47! kill edx
48movsx ebx,2(edx)
49inc ebx
50mov eax,ebx
51movsx eax,eax
52mov edx,12(ebp)
53! kill edx
54o16 mov 2(edx),eax
55mov edx,12(ebp)
56movsx eax,(edx)
57movsx ebx,(esi)
58xor ebx,eax
59o16 mov (esi),ebx
60movsx eax,2(esi)
61mov edx,12(ebp)
62! kill edx
63movsx ecx,2(edx)
64sub ecx,eax
65neg ecx
66mov eax,ecx
67movsx eax,eax
68o16 mov 2(esi),eax
69o16 mov -18(ebp),64
70mov -12(ebp),0
71mov -8(ebp),0
72I1_10:
73movzx edx,-18(ebp)
74mov eax,edx
75movsx eax,eax
76dec eax
77o16 mov -18(ebp),eax
78mov eax,edx
79movsx eax,eax
80test eax,eax
81je I1_9
82lea eax,-12(ebp)
83push eax
84call .b64_lsft
85pop ecx
86mov edx,12(ebp)
87mov edx,4(edx)
88cmp 4(esi),edx
89jb I1_14
90mov edx,12(ebp)
91mov edx,4(edx)
92cmp 4(esi),edx
93jne I1_13
94mov edx,12(ebp)
95mov edx,8(edx)
96cmp 8(esi),edx
97jb I1_14
98I1_13:
99inc -8(ebp)
100mov edx,12(ebp)
101mov ecx,8(esi)
102cmp 8(edx),ecx
103jbe I1_18
104mov edx,4(esi)
105sub edx,1
106mov 4(esi),edx
107I1_18:
108mov edx,12(ebp)
109mov ecx,4(esi)
110sub ecx,4(edx)
111mov 4(esi),ecx
112mov edx,12(ebp)
113mov ecx,8(esi)
114sub ecx,8(edx)
115mov 8(esi),ecx
116I1_14:
117mov edi,esi
118add edi,4
119mov edx,(edi)
120or edx,4(edi)
121je I1_21
122mov eax,1
123jmp I1_22
124I1_21:
125xor eax,eax
126I1_22:
127o16 mov -2(ebp),eax
128movzx edx,-2(ebp)
129test edx,edx
130je I1_9
131lea eax,4(esi)
132push eax
133call .b64_lsft
134pop ecx
135jmp I1_10
136I1_9:
137movsx eax,-18(ebp)
138! kill cc
139test eax,eax
140jle I1_27
141lea edi,-12(ebp)
142movsx eax,-18(ebp)
143cmp eax,31
144jle I1_30
145mov edx,4(edi)
146mov (edi),edx
147movsx eax,-18(ebp)
148sub eax,32
149o16 mov -18(ebp),eax
150mov 4(edi),0
151I1_30:
152cmp (edi),0
153je I1_33
154movsx eax,-18(ebp)
155mov ecx,eax
156mov edx,(edi)
157sal edx,cl
158mov (edi),edx
159I1_33:
160add edi,4
161cmp (edi),0
162je I1_27
163movsx eax,-18(ebp)
164sub eax,32
165neg eax
166mov ecx,eax
167mov edx,(edi)
168shr edx,cl
169or -12(ebp),edx
170movsx eax,-18(ebp)
171mov ecx,eax
172mov edx,(edi)
173sal edx,cl
174mov (edi),edx
175I1_27:
176lea eax,-12(ebp)
177push eax
178lea eax,4(esi)
179push eax
180mov ecx,2
181call .blm
182push esi
183call .nrm_ext
184pop ecx
185movsx eax,2(esi)
186cmp eax,-16382
187jge I1_39
188push 5
189call __fptrp
190pop ecx
191o16 mov 2(esi),-16382
192xor edx,edx
193mov 8(esi),edx
194mov 4(esi),edx
195jmp I1_1
196I1_39:
197movsx eax,2(esi)
198cmp eax,16383
199jl I1_1
200push 4
201call __fptrp
202pop ecx
203o16 mov 2(esi),16383
204xor edx,edx
205mov 8(esi),edx
206mov 4(esi),edx
207I1_1:
208pop edi
209pop esi
210leave
211ret
Note: See TracBrowser for help on using the repository browser.