From: Tomas Hruby Date: Fri, 5 Mar 2010 22:23:03 +0000 (+0000) Subject: Fix for FPU broken by r6131 X-Git-Tag: v3.1.7~253 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/addsub.png?a=commitdiff_plain;h=ecf1a36d485d25fd30ff64580ab6594415c4cc6f;p=minix.git 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. --- diff --git a/kernel/arch/i386/mpx386.S b/kernel/arch/i386/mpx386.S index 7866c8d52..d5809252e 100644 --- a/kernel/arch/i386/mpx386.S +++ b/kernel/arch/i386/mpx386.S @@ -621,16 +621,16 @@ copr_not_available: clts cld /* set direction flag to a known value */ SAVE_PROCESS_CTX_NON_LAZY(0) + /* stop user process cycles */ + push %ebp + call cycles_accounting_stop + pop %ebp lea P_MISC_FLAGS(%ebp), %ebx movw (%ebx), %cx and $MF_FPU_INITIALIZED, %cx jnz 0f /* jump if FPU is already initialized */ orw $MF_FPU_INITIALIZED, (%ebx) fninit - /* stop user process cycles */ - push %ebp - call cycles_accounting_stop - add $4, %esp jmp copr_return 0: /* load FPU context for current process */ mov %ss:FP_SAVE_AREA_P(%ebp), %eax