[M3commit] CVS Update: cm3
Jay Krell
jkrell at elego.de
Sun Jun 13 04:48:54 CEST 2010
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