From owner-freebsd-alpha Mon Feb 28 23:30:12 2000 Delivered-To: freebsd-alpha@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 22D2437BA4C for ; Mon, 28 Feb 2000 23:30:10 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id XAA26859; Mon, 28 Feb 2000 23:30:09 -0800 (PST) (envelope-from gnats@FreeBSD.org) Date: Mon, 28 Feb 2000 23:30:09 -0800 (PST) Message-Id: <200002290730.XAA26859@freefall.freebsd.org> To: freebsd-alpha@freebsd.org Cc: From: Nobuhiro Yasutomi Subject: Re: alpha/17032: strtod(3) floating exception Reply-To: Nobuhiro Yasutomi Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR alpha/17032; it has been noted by GNATS. From: Nobuhiro Yasutomi To: freebsd-gnats-submit@FreeBSD.org Cc: Subject: Re: alpha/17032: strtod(3) floating exception Date: Tue, 29 Feb 2000 16:27:37 +0900 I checked my send-pr alpha/17032 problem. The problem live in src/lib/libc/stdlib/strtod.c source code. The source code assume sizeof(long)==4, then bounded value make to be exception. Well, There is need fix to mach. Then I tried import from NetBSD source code and hacked that. It seem to work. Based NetBSD-current source as $NetBSD: strtod.c,v 1.33 1999/11/26 07:39:45 msaitoh Exp $ and patched for FreeBSD are: --- /tmp/strtod.c Tue Feb 29 15:49:07 2000 +++ strtod.c Tue Feb 29 16:11:36 2000 @@ -108,6 +108,9 @@ #endif #endif +#if defined(__FreeBSD__) && defined(__alpha__) +#define IEEE_LITTLE_ENDIAN +#endif #ifdef __arm32__ /* * Although the CPU is little endian the FP has different @@ -142,8 +145,13 @@ #include "memory.h" #endif #endif +#if defined(__FreeBSD__) +#define mutex_lock(x) +#define mutex_unlock(x) +#else #include "extern.h" #include "reentrant.h" +#endif #ifdef MALLOC #ifdef KR_headers @@ -283,8 +291,13 @@ #define LSB 1 #define Sign_bit 0x80000000 #define Log2P 1 +#if defined(__FreeBSD__) && defined(__alpha__) +#define Tiny0 0x100000 +#define Tiny1 0 +#else /* !FreeBSD/alpha */ #define Tiny0 0 #define Tiny1 1 +#endif /* FreeBSD/alpha */ #define Quick_max 14 #define Int_max 14 #define Infinite(x) (word0(x) == 0x7ff00000) /* sufficient test for here */ --- Nobuhiro Yasutomi ISAC, Inc. http://www.isac.co.jp/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message