Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 1197 → Rev 1198

/kernel/branches/net/core/fpu.inc
142,7 → 142,7
ret
 
align 4
e7: ;#NM exception handler
except_7: ;#NM exception handler
save_ring3_context
clts
mov ax, app_data ;
181,108 → 181,3
iglobal
fpu_owner dd 0
endg
 
reg_eip equ ebp+4
reg_cs equ ebp+8
reg_eflags equ ebp+12
reg_esp equ ebp+16
reg_ss equ ebp+20
 
align 4
except_16: ;fpu native exceptions handler
test byte [esp+8+2], 2
jnz v86_except_16
push ebp
mov ebp, esp
 
push eax
push ebx
push ecx
push edx
 
mov ebx, [CURRENT_TASK]
shl ebx, 8
 
mov eax, [ebx+SLOT_BASE+APPDATA.fpu_handler]
test eax, eax
jz .default
 
mov ecx, [reg_eip]
mov edx, [reg_esp]
sub edx, 4
mov [edx], ecx
mov [reg_esp], edx
mov dword [reg_eip], eax
 
pop edx
pop ecx
pop ebx
pop eax
 
leave
iretd
 
.default:
pop edx
pop ecx
pop ebx
pop eax
leave
 
save_ring3_context ;debugger support
 
mov bl, 16
jmp exc_c
 
align 4
except_19: ;sse exceptions handler
test byte [esp+8+2], 2
jnz v86_except_19
push ebp
mov ebp, esp
 
push eax
push ebx
push ecx
push edx
 
mov ebx, [current_slot]
 
mov eax, [ebx+APPDATA.sse_handler]
test eax, eax
jz .default
 
mov ecx, [reg_eip]
mov edx, [reg_esp]
sub edx, 4
mov [edx], ecx
mov [reg_esp], edx
mov dword [reg_eip], eax
 
pop edx
pop ecx
pop ebx
pop eax
 
leave
iretd
 
.default:
pop edx
pop ecx
pop ebx
pop eax
leave
 
save_ring3_context ;debugger support
 
mov bl, 19
jmp exc_c
 
restore reg_eip
restore reg_cs
restore reg_eflags
restore reg_esp
restore reg_ss