[M3commit] CVS Update: cm3

Jay K jay.krell at cornell.edu
Sun Jun 13 04:50:40 CEST 2010


Index: ALPHA_OSF
===================================================================
RCS file: /usr/cvs/cm3/m3-sys/cminstall/src/config-no-install/ALPHA_OSF,v
retrieving revision 1.4
diff -u -r1.4 ALPHA_OSF
--- ALPHA_OSF    12 Jun 2010 14:52:24 -0000    1.4
+++ ALPHA_OSF    13 Jun 2010 02:48:19 -0000
@@ -61,6 +61,7 @@
 
 m3back_pic = "" % It seems that -fPIC isn't needed!  cool.
 m3back_m64 = "" % -m64 not allowed
+m3back_mieee = "-mieee"
 
 %--------------------------------------------------------------- C compiler ---
 % "compile_c" is called to compile C source files.  Note that this function
Index: Unix.common
===================================================================
RCS file: /usr/cvs/cm3/m3-sys/cminstall/src/config-no-install/Unix.common,v
retrieving revision 1.62
diff -u -r1.62 Unix.common
--- Unix.common    2 Jun 2010 11:12:03 -0000    1.62
+++ Unix.common    13 Jun 2010 02:48:19 -0000
@@ -80,11 +80,16 @@
   m3back_m64 = {"32BITS" : "", "64BITS" : "-m64"}{WORD_SIZE}
 end
 
+if not defined("m3back_mieee")
+  m3back_mieee = ""
+end
+
 proc m3_backend(source, object, optimize, debug) is
     local args = [ "-quiet",
                    "-fno-reorder-blocks",
                    m3back_unwind_table,
                    m3back_pic,
+                   m3back_mieee,
                    m3back_m32,
                    m3back_m64 ]
     if optimize


----------------------------------------
> Date: Sun, 13 Jun 2010 04:48:54 +0000
> To: m3commit at elegosoft.com
> From: jkrell at elego.de
> Subject: [M3commit] CVS Update: cm3
>
> CVSROOT: /usr/cvs
> Changes by: jkrell at birch. 10/06/13 04:48:54
>
> Modified files:
> cm3/m3-sys/cminstall/src/config-no-install/: ALPHA_OSF
> Unix.common
>
> Log message:
> -mieee is needed to support denormal floating point, such
> as m3-libs/m3core/src/float/IEEE/LongReal.i3
> MinPos: T = 4.9406564584124654D-324;
> (* The minimum positive value in T. *)
>
> MinPosNormal: T = 2.2250738585072014D-308;
> (* The minimum positive "normal" value in T; differs from MinPos
> only for implementations with denormalized numbers. *)
>
> Otherwise MinPos is NaN and multiplication with it here:
>
> m3-libs/arithmetic/src/basictypes/float/FloatTrans.ig
> Tiny = R.MinPos * FLOAT(1000.0, T); (* nearly 0.0 *)
>
> issues a SIGFPE, when R = LongReal.
>
> I also wonder if maybe MinPos should be adjusted to be normal
> or ALPHA_OSF should do so (i.e. not use generic IEEE directory, e.g.:
> VAX/LongReal.i3: MinPos: T = 2.93873587705571880D-39;
> VAX/LongReal.i3: MinPosNormal: T = MinPos;
> )
>
> Probably best to be like all the other architectures though,
> even if it costs some perf. You know, some people like floating point
> to be really really the same across all architectures..witness
> Java, Java -strictfp, and the lack of any Java for VAX.
>
> see:
> http://gcc.gnu.org/onlinedocs/gcc-4.5.0/gcc/DEC-Alpha-Options.html#DEC-Alpha-Options
>
> A program like this demontrates it, I think it was, from memory:
>
> int main()
> {
> long a = 0x3E8; /* NaN */
> double b = *(double*)&a;
> double c = b * 1000;;
> return 0;
> }
>
> or:
> int main()
> {
> double a = 4.9406564584124654e-324;
> double b = a * 1000;
> return 0;
> }
>
> We should probably hardcode this in parse.c for Alpha instead
> of relying on the config files.
>
 		 	   		  


More information about the M3commit mailing list