From owner-freebsd-arch Thu Jan 10 8:31:45 2002 Delivered-To: freebsd-arch@freebsd.org Received: from ns.yogotech.com (ns.yogotech.com [206.127.123.66]) by hub.freebsd.org (Postfix) with ESMTP id D56DC37B402 for ; Thu, 10 Jan 2002 08:31:39 -0800 (PST) Received: from caddis.yogotech.com (caddis.yogotech.com [206.127.123.130]) by ns.yogotech.com (8.9.3/8.9.3) with ESMTP id JAA24073; Thu, 10 Jan 2002 09:31:26 -0700 (MST) (envelope-from nate@yogotech.com) Received: (from nate@localhost) by caddis.yogotech.com (8.11.6/8.11.6) id g0AGVPb23360; Thu, 10 Jan 2002 09:31:25 -0700 (MST) (envelope-from nate) From: Nate Williams MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15421.49628.630456.688977@caddis.yogotech.com> Date: Thu, 10 Jan 2002 09:31:24 -0700 To: Bruce Evans Cc: Nate Williams , Daniel Eischen , Dan Eischen , Peter Wemm , Archie Cobbs , Alfred Perlstein , Subject: Re: Request for review: getcontext, setcontext, etc In-Reply-To: <20020110141330.M10745-100000@gamplex.bde.org> References: <15420.58839.954146.527043@caddis.yogotech.com> <20020110141330.M10745-100000@gamplex.bde.org> X-Mailer: VM 6.96 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid Reply-To: nate@yogotech.com (Nate Williams) 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 > > > > Assuming I used followed things up with 'fnsave', will the exception be > > > > triggered by a frstor, and thus the exception will be correctly reported > > > > by the thread triggering the exception? > > > > > > Only on broken systems. > > > > Why is reporting a SIGFPE considered broken? This is a valid exception, > > and it should be reported. > > Because the SIGFPE is for the broken context-switching code and not for > the program. Ok, let's try again. How can I make sure that a SIGFPE that occur due to a FPU operation is properly reported using fsave/frestor? (I've asked this before, but apparently not in a way that made sense.) Here's a snippet again. fldz fld1 fdiv %st,%st(1) # 1.0 / 0.0 (should cause a SIGFPE exception) fsave #fooLocation // Mumble mumble other code to choose a new thread frstor #barLocation Questions * Would 'thread 1' get a SIGFPE before the fsave instruction? (Yes, No, maybe) * If above is maybe, would it get the SIGFPE after a frstor #fooLocation? * If answer to both is NO, how do I make sure that the context of the fdiv receives a SIGFPE? Can I use a different operation? Can I add instructions to cause this to work correctly? > > > See Appendix C of the Intel MMX manual (1997 version at least) for more > > > details. > > > > I don't have the MXX manual, just the x86/87 programming manuals for x86 > > (X <= 3). > > Same here, except I also have the 486 manual and a web browser :-). Ahh, these manuals are online. Thanks for the URL. :) Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message