Date: Tue, 29 Feb 2000 16:17:38 +0900 From: Nobuhiro Yasutomi <nobu@rd.isac.co.jp> To: gnats-admin@FreeBSD.org, freebsd-alpha@freebsd.org Subject: Re: alpha/17032: strtod(3) floating exception Message-ID: <20000229161738I.nobu@rd.isac.co.jp> In-Reply-To: Your message of "Sun, 27 Feb 2000 20:40:01 -0800 (PST)" <200002280440.UAA89573@freefall.freebsd.org> References: <200002280440.UAA89573@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000229161738I.nobu>