Date: Tue, 2 Apr 2002 10:14:52 -0500 (EST) From: Andrew Gallatin <gallatin@cs.duke.edu> To: rittle@labs.mot.com Cc: freebsd-alpha@FreeBSD.ORG Subject: Re: alpha/36327: trap within cvt() while attempting to printf() an FP number Message-ID: <15529.51948.89157.959573@grasshopper.cs.duke.edu> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15529.51948.89157.959573>