bug-classpath
[Top][All Lists]
Advanced

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

[Bug classpath/22800] ARM double to ascii conversion issue


From: gccbugzilla at themastermind1 dot net
Subject: [Bug classpath/22800] ARM double to ascii conversion issue
Date: 17 Apr 2006 18:12:07 -0000


------- Comment #17 from gccbugzilla at themastermind1 dot net  2006-04-17 
18:12 -------
Digging deeper into the issue (with a little help from Paul Brook), it turns
out that this bug only appears on toolchains compiled with FPA soft/hard float.
The correct patch is as follows:

--- native/fdlibm/mprec.h.orig  2006-04-17 14:04:49.000000000 -0400
+++ native/fdlibm/mprec.h       2006-04-17 14:05:22.000000000 -0400
@@ -100,7 +100,7 @@ union double_union
  * An alternative that might be better on some machines is
  * #define Storeinc(a,b,c) (*a++ = b << 16 | c & 0xffff)
  */
-#if defined(IEEE_8087) + defined(VAX)
+#if defined(__IEEE_BYTES_LITTLE_ENDIAN) + defined(IEEE_8087) + defined(VAX)
 #define Storeinc(a,b,c) (((unsigned short *)a)[1] = (unsigned short)b, \
 ((unsigned short *)a)[0] = (unsigned short)c, a++)
 #else

This defines the correct Storeinc macro when using FPA. According to ieeefp.h,
when using FPA:

#define __IEEE_BIG_ENDIAN
#ifdef __ARMEL__
#define __IEEE_BYTES_LITTLE_ENDIAN
#endif

This patch has been discussed in the past but isn't in the mprec.h included in
classpath: http://sourceware.org/ml/newlib/2001/msg00395.html

Also, a recently commited fix for this issue is incorrect. It should be
reverted in favor of this patch:
http://developer.classpath.org/pipermail/classpath-patches/2006-January/000019.html

Also note when testing, jikes 1.22 does not produce proper bytecode for floats
on ARM (FPA only again?). Some notes at
http://sourceforge.net/mailarchive/forum.php?thread_id=10191309&forum_id=43932


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22800





reply via email to

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