axiom-developer
[Top][All Lists]
Advanced

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

[Axiom-developer] Gcl-2.6.8 on Intel Solaris 10


From: Waldek Hebisch
Subject: [Axiom-developer] Gcl-2.6.8 on Intel Solaris 10
Date: Fri, 13 Jul 2007 23:18:40 +0200 (CEST)

I have now found reason for wrong results on Intel Solaris 10.
Namely, gcl compiled some floating point functions assuming
that the machine is big endian.

So, one got:

>(floor 8.5)

0
8.5

The code to do conversion looks brittle -- it uses unions to
do "type convesion", which probably violates C aliasing rules.
Also setting parametrs in system specific configuration files
does not look like best method (2.7.0 apparently uses different
method to determine if the machine is big endian).

So good fix would probably clean the gcl code a little.  However,
below is almost minimal patch in the style used in 2.6.8.  It
solves the 'floor' problems -- in fact it seems that when this
patch is applied there is no regression in Axiom compared to
Linux.

--- gcl/h/solaris-i386.h        Thu Jul 12 22:30:08 2007
+++ gcl_m/h/solaris-i386.h      Fri Jul 13 22:19:10 2007
@@ -1,3 +1,6 @@
+#define I386
+#define LITTLE_END
+
 #define ElfW(a) Elf32_ ## a
 #if !defined(HAVE_LIBBFD) && !defined(USE_DLOPEN)
 #define __ELF_NATIVE_CLASS 32


-- 
                              Waldek Hebisch
address@hidden 




reply via email to

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