From owner-freebsd-arch Mon Jan 7 13:39:25 2002 Delivered-To: freebsd-arch@freebsd.org Received: from pcnet1.pcnet.com (pcnet1.pcnet.com [204.213.232.3]) by hub.freebsd.org (Postfix) with ESMTP id 07AA437B404 for ; Mon, 7 Jan 2002 13:39:22 -0800 (PST) Received: (from eischen@localhost) by pcnet1.pcnet.com (8.12.1/8.12.1) id g07LcGi9000280; Mon, 7 Jan 2002 16:38:16 -0500 (EST) Date: Mon, 7 Jan 2002 16:38:16 -0500 (EST) From: Daniel Eischen To: Nate Williams Cc: Dan Eischen , arch@FreeBSD.ORG Subject: Re: Request for review: getcontext, setcontext, etc In-Reply-To: <15418.4935.657413.312252@caddis.yogotech.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG [CC's trimmed] On Mon, 7 Jan 2002, Nate Williams wrote: > > Search for FP_SAVE_UC and FP_RESTORE_UC. You should find it in > > pthread_private.h (where it is defined) and referenced in > > uthread_kern.c and uthread_sig.c (src/lib/libc_r/uthread/). > > Found it. However, I could find the definition for mc_fpregs. See src/sys/sys/ucontext.h and src/sys/i386/include/ucontext.h. > Also, forgive my ignorance, but why are we using fnsave instead of > fsave? From my reading of the x86 manuals, it would seem that there is > the possibility of getting bogus FPU results with fnsave (vs. fsave) > since by using fsave, we give the FPU a chance to finish up the current > FPU operations before we save the state? I could see where they might > be a race where we might end up storing intermediate results of the FPU > in some instances. > > Or, is there something else I'm missing? (The reason I ask is that the > JDK uses fsave to be 'safe', but maybe it's not buying us anything other > than warm fuzzies. :) I don't know :-) That's what it was using when John Birrell was maintaining libc_r. I can always change it... -- Dan Eischen To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message