From owner-freebsd-alpha Tue Apr 2 7:15:27 2002 Delivered-To: freebsd-alpha@freebsd.org Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) by hub.freebsd.org (Postfix) with ESMTP id ABC3337B405 for ; Tue, 2 Apr 2002 07:15:22 -0800 (PST) Received: from grasshopper.cs.duke.edu (grasshopper.cs.duke.edu [152.3.145.30]) by duke.cs.duke.edu (8.9.3/8.9.3) with ESMTP id KAA05825; Tue, 2 Apr 2002 10:15:22 -0500 (EST) Received: (from gallatin@localhost) by grasshopper.cs.duke.edu (8.11.6/8.9.1) id g32FEq093770; Tue, 2 Apr 2002 10:14:52 -0500 (EST) (envelope-from gallatin@cs.duke.edu) From: Andrew Gallatin MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15529.51948.89157.959573@grasshopper.cs.duke.edu> Date: Tue, 2 Apr 2002 10:14:52 -0500 (EST) To: rittle@labs.mot.com Cc: freebsd-alpha@FreeBSD.ORG Subject: Re: alpha/36327: trap within cvt() while attempting to printf() an FP number In-Reply-To: <15529.48345.376711.770341@grasshopper.cs.duke.edu> References: <200203260906.g2Q962l84742@freefall.freebsd.org> <15520.33765.216885.639741@grasshopper.cs.duke.edu> <200204020813.g328DLq66977@latour.rsch.comm.mot.com> <15529.48345.376711.770341@grasshopper.cs.duke.edu> X-Mailer: VM 6.75 under 21.1 (patch 12) "Channel Islands" XEmacs Lucid Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Andrew Gallatin writes: > > Loren James Rittle writes: > > > > In any event, it is not the code for d/10 that traps. It is code > > inside cvt() which is called from vfprintf(). Two issues: Should a > > library routine ever internally trap; no matter what the mask setting? > > Shouldn't there be some way to disable the trap? > > There is currently no way to disable the trap for routines which are > not compiled with -mieee. The library is not compiled with -mieee, so > even if you don't get the trap in your code, you may get the trap in a > library. (I compile my libm with -mieee so that Konqueror doesn't crash with > FPE's on poorly written javascript code, its worth the slowdown. Patch appended.) Do'h! Here's that patch.. Drew Index: Makefile =================================================================== RCS file: /home/ncvs/src/lib/msun/Makefile,v retrieving revision 1.23.2.2 diff -u -r1.23.2.2 Makefile --- Makefile 17 Dec 2001 10:09:20 -0000 1.23.2.2 +++ Makefile 29 Mar 2002 15:06:16 -0000 @@ -45,11 +45,7 @@ .PATH: ${.CURDIR)/alpha ARCH= alpha ARCH_SRCS = s_copysign.S s_copysignf.S -# XXX Comment from NetBSD/Alpha: -# XXX LINT SIGFPEs in e_exp.c's strtod(). FP underflow/denorm software -# handling is broken (doesn't exist!) on the Alpha port. -# Stock gcc 2.7.2.1 doesn't understand these options. -#CFLAGS += -mtrap-precision=i -mfp-trap-mode=su +CFLAGS += -mieee .elif ${MACHINE_ARCH} == "i386" ARCH= i387 ARCH_PREFIX= ${ARCH}_ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message