Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Feb 2000 23:30:09 -0800 (PST)
From:      Nobuhiro Yasutomi <nobu@rd.isac.co.jp>
To:        freebsd-alpha@freebsd.org
Subject:   Re: alpha/17032: strtod(3) floating exception
Message-ID:  <200002290730.XAA26859@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR alpha/17032; it has been noted by GNATS.

From: Nobuhiro Yasutomi <nobu@rd.isac.co.jp>
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200002290730.XAA26859>