Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sat, 3 Mar 2001 19:28:18 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sat, 3 Mar 2001 19:28:08 -0500 Received: from mozart.stat.wisc.edu ([128.105.5.24]:10511 "EHLO mozart.stat.wisc.edu") by vger.kernel.org with ESMTP id ; Sat, 3 Mar 2001 19:28:03 -0500 To: Alan Cox Cc: linux-kernel@vger.kernel.org Subject: Re: RFC: changing precision control setting in initial FPU context In-Reply-To: From: buhr@stat.wisc.edu (Kevin Buhr) In-Reply-To: Alan Cox's message of "Sat, 3 Mar 2001 23:37:45 +0000 (GMT)" Date: 03 Mar 2001 18:27:50 -0600 Message-ID: Lines: 28 User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Alan Cox writes: > > You want peoples existing applications to suddenely and magically change > their results. Umm problem. So, how would you feel about a mechanism whereby the kernel could be passed a default FPU control word by the binary (with old binaries, by default, using the old default control word)? There's already an ELF AT_FPUCW auxv entry type. What if this was used by the kernel, rather than the C library (as it is now), to set a default to be used in "init_fpu()" when and if the program executed a floating point instruction? Then, a compiler startup-code writer would be able to specify a default control word for binaries that was appropriate for (new) programs generated by that compiler *WITHOUT* worrying about whether he was accidentally turning a non-FP program into an FP program by introducing "fnstcw" as its only FPU instruction. The C library is already trying to do this (setting the CW based on the AT_FPUCW vector). It just can't do it *right* because it doesn't know if the program is really FP. It just guesses that if the AT_FPUCW vector contains something other than the hard-coded _FPU_DEFAULT (which is supposed to be equal to the kernel default: it isn't, but it's close enough), it must be set; otherwise, it's left alone. Kevin - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/