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