classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] 64-bit dtoa - strtod fix


From: David P Grove
Subject: Re: [PATCH] 64-bit dtoa - strtod fix
Date: Fri, 23 Jan 2004 16:08:37 -0500


Hi,

        It looks like this patch may have gotten dropped; Could someone please apply it;  it fixes a problem we've also observed with the 64 bit port of Jikes RVM.

thanks,

--dave



Christian Thalinger <address@hidden>
Sent by: address@hidden

01/11/2004 11:28 AM

       
        To:        address@hidden
        cc:        
        Subject:        [PATCH] 64-bit dtoa - strtod fix



We are building a java jit called cacao
(http://www.complang.tuwien.ac.at/java/cacao/) which now uses the gnu
classpath. On our 64-bit ports we had problems with dtoa and strtod
functions. After a long night of debugging, i found the problem: it
seems that in mprec.h

#define MAX_BIGNUM_WDS 32

is too small for some floats. The amount can grow up to 48, as my
debugging showed. On i386 systems where Pack_32 is defined, it seems to
be ok. But Pack_32 does not work on 64-bit systems.

This bug is hit, when you try to execute this small code

class test {
   public static void main(String[] argv) {
       System.out.println(Double.MIN_VALUE);
   }
}

with gij (gcc-3.3.2) on x86_64. Defining

#define MAX_BIGNUM_WDS 64

shows the expected result with our jit. I don't know if 64 is a
reasonable number, but when not packing 32-bit in a long but 16-bit,
twice as much should be ok.

This is also cross-posted to address@hidden

TWISTI

--- classpath-0.07/native/fdlibm/mprec.h        2001-11-05
03:56:47.000000000 +0100
+++ cacaodev/gnuclasspath/native/fdlibm/mprec.h 2004-01-11
17:17:55.000000000 +0100
@@ -295,7 +298,12 @@


#define MAX_BIGNUMS 16
+
+#ifndef Pack_32
+#define MAX_BIGNUM_WDS 64
+#else
#define MAX_BIGNUM_WDS 32
+#endif

struct _Jv_Bigint
{




_______________________________________________
Classpath mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/classpath


reply via email to

[Prev in Thread] Current Thread [Next in Thread]