Rev 1056 | Rev 2288 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1056 | Rev 1074 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | ;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; ;; |
5 | ;; ;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 7... | Line 7... | ||
7 | 7 | ||
Line 8... | Line 8... | ||
8 | $Revision: 1056 $ |
8 | $Revision: 1074 $ |
9 | 9 | ||
10 | 10 | ||
Line 179... | Line 179... | ||
179 | iret |
179 | iret |
Line 180... | Line 180... | ||
180 | 180 | ||
181 | iglobal |
181 | iglobal |
182 | fpu_owner dd 0 |
182 | fpu_owner dd 0 |
183 | endg |
- | |
184 | - | ||
185 | reg_eip equ ebp+4 |
- | |
186 | reg_cs equ ebp+8 |
- | |
187 | reg_eflags equ ebp+12 |
- | |
188 | reg_esp equ ebp+16 |
- | |
189 | reg_ss equ ebp+20 |
- | |
190 | - | ||
191 | align 4 ;not used now |
- | |
192 | proc except_16 ;fpu native exceptions handler |
- | |
193 | test byte [esp+8+2], 2 |
- | |
194 | jnz v86_except_16 |
- | |
195 | push ebp |
- | |
196 | mov ebp, esp |
- | |
197 | - | ||
198 | push eax |
- | |
199 | push ebx |
- | |
200 | push ecx |
- | |
201 | push edx |
- | |
202 | - | ||
203 | mov ebx, [CURRENT_TASK] |
- | |
204 | shl ebx, 8 |
- | |
205 | - | ||
206 | mov eax, [ebx+SLOT_BASE+APPDATA.fpu_handler] |
- | |
207 | test eax, eax |
- | |
208 | jz .default |
- | |
209 | - | ||
210 | mov ecx, [reg_eip] |
- | |
211 | mov edx, [reg_esp] |
- | |
212 | sub edx, 4 |
- | |
213 | mov [edx], ecx |
- | |
214 | mov [reg_esp], edx |
- | |
215 | mov dword [reg_eip], eax |
- | |
216 | - | ||
217 | pop edx |
- | |
218 | pop ecx |
- | |
219 | pop ebx |
- | |
220 | pop eax |
- | |
221 | - | ||
222 | leave |
- | |
223 | iretd |
- | |
224 | - | ||
225 | .default: |
- | |
226 | pop edx |
- | |
227 | pop ecx |
- | |
228 | pop ebx |
- | |
229 | pop eax |
- | |
230 | leave |
- | |
231 | - | ||
232 | save_ring3_context ;debugger support |
- | |
233 | - | ||
234 | mov bl, 16 |
- | |
235 | jmp exc_c |
- | |
236 | endp |
- | |
237 | - | ||
238 | align 4 ;not used now |
- | |
239 | proc except_19 ;sse exceptions handler |
- | |
240 | test byte [esp+8+2], 2 |
- | |
241 | jnz v86_except_19 |
- | |
242 | push ebp |
- | |
243 | mov ebp, esp |
- | |
244 | - | ||
245 | push eax |
- | |
246 | push ebx |
- | |
247 | push ecx |
- | |
248 | push edx |
- | |
249 | - | ||
250 | mov ebx, [current_slot] |
- | |
251 | - | ||
252 | mov eax, [ebx+APPDATA.sse_handler] |
- | |
253 | test eax, eax |
- | |
254 | jz .default |
- | |
255 | - | ||
256 | mov ecx, [reg_eip] |
- | |
257 | mov edx, [reg_esp] |
- | |
258 | sub edx, 4 |
- | |
259 | mov [edx], ecx |
- | |
260 | mov [reg_esp], edx |
- | |
261 | mov dword [reg_eip], eax |
- | |
262 | - | ||
263 | pop edx |
- | |
264 | pop ecx |
- | |
265 | pop ebx |
- | |
266 | pop eax |
- | |
267 | - | ||
268 | leave |
- | |
269 | iretd |
- | |
270 | - | ||
271 | .default: |
- | |
272 | pop edx |
- | |
273 | pop ecx |
- | |
274 | pop ebx |
- | |
275 | pop eax |
- | |
276 | leave |
- | |
277 | - | ||
278 | save_ring3_context ;debugger support |
- | |
279 | - | ||
280 | mov bl, 19 |
- | |
281 | jmp exc_c |
- | |
282 | endp |
- | |
283 | - | ||
284 | restore reg_eip |
- | |
285 | restore reg_cs |
- | |
286 | restore reg_eflags |
- | |
287 | restore reg_esp |
- | |
288 | restore reg_ss |
- | |
289 | - |