source: trunk/minix/lib/ack/float/compact.s@ 12

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

Minix 3.1.2a

File size: 3.3 KB
Line 
1.sect .text; .sect .rom; .sect .data; .sect .bss
2.extern .compact
3.sect .text
4.compact:
5push ebp
6mov ebp,esp
7sub esp,16
8push esi
9push edi
10mov esi,8(ebp)
11mov -4(ebp),0
12cmp 16(ebp),8
13jne I1_4
14mov edi,12(ebp)
15mov edx,-768
16and edx,8(esi)
17or edx,4(esi)
18jne I1_7
19push edi
20call .zrf8
21pop ecx
22jmp I1_1
23I1_7:
24movsx eax,2(esi)
25add eax,1023
26movsx eax,eax
27o16 mov 2(esi),eax
28movsx ebx,2(esi)
29cmp ebx,2046
30jle I1_10
31I1_12:
32push 4
33call __fptrp
34pop ecx
35o16 mov 2(esi),2047
36mov 4(esi),0
37mov 8(esi),0
38mov edx,-4(ebp)
39mov ecx,edx
40inc ecx
41mov -4(ebp),ecx
42test edx,edx
43je I1_11
44jmp I1_1
45I1_10:
46movsx eax,2(esi)
47! kill cc
48test eax,eax
49jg I1_11
50lea eax,4(esi)
51push eax
52call .b64_rsft
53pop ecx
54movsx eax,2(esi)
55test eax,eax
56jns I1_11
57movsx eax,2(esi)
58neg eax
59push eax
60lea eax,4(esi)
61push eax
62call .b64_sft
63pop ecx
64pop ecx
65o16 mov 2(esi),0
66I1_11:
67mov edx,4(esi)
68shr edx,11
69mov (edi),edx
70mov edx,8(esi)
71shr edx,11
72mov 4(edi),edx
73lea edx,4(edi)
74mov -12(ebp),edx
75mov ecx,4(esi)
76sal ecx,21
77or ecx,(edx)
78mov eax,-12(ebp)
79mov (eax),ecx
80! kill eax
81mov edx,2047
82and edx,8(esi)
83cmp edx,1024
84ja I1_22
85mov edx,2047
86and edx,8(esi)
87cmp edx,1024
88jne I1_23
89test 8(esi),2048
90je I1_23
91I1_22:
92lea edx,4(edi)
93mov -12(ebp),edx
94mov ecx,1
95add ecx,(edx)
96mov eax,-12(ebp)
97mov (eax),ecx
98! kill eax
99cmp 4(edi),0
100jne I1_28
101mov -12(ebp),edi
102mov edx,1
103add edx,(edi)
104mov eax,-12(ebp)
105mov (eax),edx
106! kill eax
107movzx edx,2(esi)
108test edx,edx
109jne I1_31
110test (edi),-1048576
111je I1_31
112movsx eax,2(esi)
113inc eax
114movsx eax,eax
115o16 mov 2(esi),eax
116I1_31:
117test (edi),2097152
118je I1_28
119mov edx,(edi)
120testb dl,1
121je I1_38
122mov 4(edi),-2147483648
123I1_38:
124mov -12(ebp),edi
125mov edx,(edi)
126shr edx,1
127mov eax,-12(ebp)
128mov (eax),edx
129! kill eax
130movsx eax,2(esi)
131inc eax
132movsx eax,eax
133o16 mov 2(esi),eax
134I1_28:
135movsx eax,2(esi)
136cmp eax,2046
137jg I1_12
138I1_23:
139mov -12(ebp),edi
140mov edx,1048575
141and edx,(edi)
142mov eax,-12(ebp)
143mov (eax),edx
144! kill eax
145mov -12(ebp),edi
146movsx eax,2(esi)
147sal eax,4
148sal eax,16
149or eax,(edi)
150mov ebx,-12(ebp)
151mov (ebx),eax
152! kill ebx
153movzx edx,(esi)
154test edx,edx
155je I1_44
156mov -12(ebp),edi
157mov edx,-2147483648
158or edx,(edi)
159mov eax,-12(ebp)
160mov (eax),edx
161! kill eax
162I1_44:
163mov edx,4(edi)
164mov -16(ebp),edx
165mov edx,(edi)
166mov 4(edi),edx
167mov edx,-16(ebp)
168mov (edi),edx
169jmp I1_1
170I1_4:
171mov edi,12(ebp)
172test 4(esi),-128
173jne I1_47
174mov (edi),0
175jmp I1_1
176I1_47:
177movsx eax,2(esi)
178add eax,127
179movsx eax,eax
180o16 mov 2(esi),eax
181movsx ebx,2(esi)
182cmp ebx,254
183jle I1_50
184I1_52:
185push 4
186call __fptrp
187pop ecx
188o16 mov 2(esi),255
189mov 4(esi),0
190mov 8(esi),0
191mov edx,-4(ebp)
192mov ecx,edx
193inc ecx
194mov -4(ebp),ecx
195test edx,edx
196je I1_51
197jmp I1_1
198I1_50:
199movsx eax,2(esi)
200! kill cc
201test eax,eax
202jg I1_51
203lea eax,4(esi)
204push eax
205call .b64_rsft
206pop ecx
207movsx eax,2(esi)
208test eax,eax
209jns I1_51
210movsx eax,2(esi)
211neg eax
212push eax
213lea eax,4(esi)
214push eax
215call .b64_sft
216pop ecx
217pop ecx
218o16 mov 2(esi),0
219I1_51:
220mov edx,4(esi)
221shr edx,8
222mov (edi),edx
223mov edx,4(esi)
224movzxb ecx,dl
225cmp ecx,128
226ja I1_62
227cmpb dl,128
228jne I1_63
229test 4(esi),256
230je I1_63
231I1_62:
232inc (edi)
233movzx edx,2(esi)
234test edx,edx
235jne I1_68
236test (edi),-8388608
237je I1_68
238movsx eax,2(esi)
239inc eax
240movsx eax,eax
241o16 mov 2(esi),eax
242I1_68:
243test (edi),16777216
244je I1_72
245shr (edi),1
246movsx eax,2(esi)
247inc eax
248movsx eax,eax
249o16 mov 2(esi),eax
250I1_72:
251movsx eax,2(esi)
252cmp eax,254
253jg I1_52
254I1_63:
255and (edi),8388607
256movsx eax,2(esi)
257sal eax,7
258sal eax,16
259or (edi),eax
260movzx edx,(esi)
261test edx,edx
262je I1_78
263or (edi),-2147483648
264I1_78:
265mov edi,(edi)
266I1_1:
267pop edi
268pop esi
269leave
270ret
Note: See TracBrowser for help on using the repository browser.