[Top][All Lists]

[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


        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.



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

01/11/2004 11:28 AM

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

We are building a java jit called 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) {

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


--- 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
#define MAX_BIGNUM_WDS 32

struct _Jv_Bigint

Classpath mailing list

reply via email to

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