Fix for FPU broken by r6131
- cycles accounting must be called earlier, firstly not to clobber the %ebx register, secondly to be correctly called in both branches.
This commit is contained in:
parent
35a108b911
commit
ecf1a36d48
1 changed files with 4 additions and 4 deletions
|
@ -621,16 +621,16 @@ copr_not_available:
|
||||||
clts
|
clts
|
||||||
cld /* set direction flag to a known value */
|
cld /* set direction flag to a known value */
|
||||||
SAVE_PROCESS_CTX_NON_LAZY(0)
|
SAVE_PROCESS_CTX_NON_LAZY(0)
|
||||||
|
/* stop user process cycles */
|
||||||
|
push %ebp
|
||||||
|
call cycles_accounting_stop
|
||||||
|
pop %ebp
|
||||||
lea P_MISC_FLAGS(%ebp), %ebx
|
lea P_MISC_FLAGS(%ebp), %ebx
|
||||||
movw (%ebx), %cx
|
movw (%ebx), %cx
|
||||||
and $MF_FPU_INITIALIZED, %cx
|
and $MF_FPU_INITIALIZED, %cx
|
||||||
jnz 0f /* jump if FPU is already initialized */
|
jnz 0f /* jump if FPU is already initialized */
|
||||||
orw $MF_FPU_INITIALIZED, (%ebx)
|
orw $MF_FPU_INITIALIZED, (%ebx)
|
||||||
fninit
|
fninit
|
||||||
/* stop user process cycles */
|
|
||||||
push %ebp
|
|
||||||
call cycles_accounting_stop
|
|
||||||
add $4, %esp
|
|
||||||
jmp copr_return
|
jmp copr_return
|
||||||
0: /* load FPU context for current process */
|
0: /* load FPU context for current process */
|
||||||
mov %ss:FP_SAVE_AREA_P(%ebp), %eax
|
mov %ss:FP_SAVE_AREA_P(%ebp), %eax
|
||||||
|
|
Loading…
Reference in a new issue