From: Erik van der Kouwe Date: Thu, 27 May 2010 09:20:50 +0000 (+0000) Subject: Oops, committed too much X-Git-Tag: v3.1.7~27 X-Git-Url: http://zhaoyanbai.com/repos/%22/xml/v3/zones/static/man.host.html?a=commitdiff_plain;h=a31e9b0400802219a43a286cae8344013a8f1a2d;p=minix.git Oops, committed too much --- diff --git a/lib/csu/i386/crtso.S b/lib/csu/i386/crtso.S index 599d49966..4bc54928c 100644 --- a/lib/csu/i386/crtso.S +++ b/lib/csu/i386/crtso.S @@ -23,7 +23,7 @@ begdata: .bss begbss: -.globl crtso, __penviron, __penvp +.globl crtso, __penviron, __penvp, __fpu_present .globl __minix_datastart, __minix_mainjump, __minix_unmapzero .extern _main, _exit @@ -61,6 +61,11 @@ crtso: push %edx /* push argv */ push %eax /* push argc */ +/* Test the EM bit of the MSW to determine if an FPU is present and */ +/* set __fpu_present if one is found. */ + smsw %ax + testb $0x4, %al /* EM bit in MSW */ + sete __fpu_present /* True if not set */ jmp __minix_mainjump .balign I386_PAGE_SIZE @@ -111,5 +116,6 @@ __penviron: .bss .lcomm __penvp, 4 /* Hidden environment vector */ +.lcomm __fpu_present, 4 /* FPU present flag */ .extern endtext /* Force loading of end labels. */