forked from KolibriOS/kolibrios
fixed: 1)uncleared fpu exceptions in fpu_save
2)fpu context lose in terminate git-svn-id: svn://kolibrios.org@203 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
4b73c68fff
commit
c6d6567ec3
@ -1038,6 +1038,7 @@ proc fpu_save
|
|||||||
jnc .no_SSE
|
jnc .no_SSE
|
||||||
|
|
||||||
fxsave [eax]
|
fxsave [eax]
|
||||||
|
fninit ;re-init fpu
|
||||||
ret
|
ret
|
||||||
.no_SSE:
|
.no_SSE:
|
||||||
fnsave [eax]
|
fnsave [eax]
|
||||||
@ -1055,6 +1056,7 @@ proc fpu_restore
|
|||||||
fxrstor [eax]
|
fxrstor [eax]
|
||||||
ret
|
ret
|
||||||
.no_SSE:
|
.no_SSE:
|
||||||
|
fnclex ;fix possible problems
|
||||||
frstor [eax]
|
frstor [eax]
|
||||||
ret
|
ret
|
||||||
endp
|
endp
|
||||||
|
@ -236,7 +236,6 @@ e7:
|
|||||||
frstor [eax]
|
frstor [eax]
|
||||||
restore_ring3_context
|
restore_ring3_context
|
||||||
iret
|
iret
|
||||||
|
|
||||||
.init:
|
.init:
|
||||||
fninit ; ¬ ¥ ã¦ë ¥¬ ᪨஢ ë¥ ¨áª«î票ï
|
fninit ; ¬ ¥ ã¦ë ¥¬ ᪨஢ ë¥ ¨áª«î票ï
|
||||||
.ready:
|
.ready:
|
||||||
@ -693,8 +692,17 @@ terminate: ; terminate application
|
|||||||
|
|
||||||
cmp [fpu_owner],esi ; if user fpu last -> fpu user = 1
|
cmp [fpu_owner],esi ; if user fpu last -> fpu user = 1
|
||||||
jne fpu_ok_1
|
jne fpu_ok_1
|
||||||
mov [fpu_owner],1
|
|
||||||
fpu_ok_1:
|
mov [fpu_owner],1
|
||||||
|
mov eax, [256+PROC_BASE+0x10]
|
||||||
|
bt [cpu_caps], CAPS_FXSR
|
||||||
|
jnc .no_SSE
|
||||||
|
fxrstor [eax]
|
||||||
|
jmp fpu_ok_1
|
||||||
|
.no_SSE:
|
||||||
|
fnclex
|
||||||
|
frstor [eax]
|
||||||
|
fpu_ok_1:
|
||||||
|
|
||||||
mov [0xf400],byte 0 ; empty keyboard buffer
|
mov [0xf400],byte 0 ; empty keyboard buffer
|
||||||
mov [0xf500],byte 0 ; empty button buffer
|
mov [0xf500],byte 0 ; empty button buffer
|
||||||
|
@ -29,12 +29,8 @@ proc new_mix stdcall, output:dword
|
|||||||
|
|
||||||
cmp [play_count], 0
|
cmp [play_count], 0
|
||||||
je .exit
|
je .exit
|
||||||
; mov eax, fpu_state
|
|
||||||
; fnsave [eax]
|
|
||||||
call FpuSave
|
call FpuSave
|
||||||
emms
|
|
||||||
mov [main_count], 32;
|
mov [main_count], 32;
|
||||||
|
|
||||||
.l00:
|
.l00:
|
||||||
mov [mix_buff_map], 0x0000FFFF;
|
mov [mix_buff_map], 0x0000FFFF;
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
@ -98,6 +94,7 @@ proc new_mix stdcall, output:dword
|
|||||||
jnz .l00
|
jnz .l00
|
||||||
|
|
||||||
call update_stream
|
call update_stream
|
||||||
|
emms
|
||||||
call FpuRestore
|
call FpuRestore
|
||||||
ret
|
ret
|
||||||
.exit:
|
.exit:
|
||||||
|
Loading…
Reference in New Issue
Block a user