Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 1073 → Rev 1074

/kernel/trunk/core/fpu.inc
181,110 → 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 ;not used now
proc 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
endp
 
align 4 ;not used now
proc 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
endp
 
restore reg_eip
restore reg_cs
restore reg_eflags
restore reg_esp
restore reg_ss