[git] CMU Common Lisp branch master updated. snapshot-2014-06-89-ge334b68
Raymond Toy
rtoy at common-lisp.net
Mon Aug 4 05:16:33 UTC 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMU Common Lisp".
The branch, master has been updated
via e334b681182e7a354db0e66caa41abe1e1bbcec5 (commit)
from 022325ccf101a0e9085f0189c4ec54dc96cef52d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e334b681182e7a354db0e66caa41abe1e1bbcec5
Author: Raymond Toy <toy.raymond at gmail.com>
Date: Sun Aug 3 22:16:22 2014 -0700
Fix aliasing issue noted by gcc 4.4.1 on Linux.
I think the offending code in each case is trying to extract the low
word if x. I think it works because on a little-endian machine,
*(unsigned*)&one is 0 since the low word is stored first. On a
big-endian machine, *(unsigned*)&one is the high word which, when
right shifted by 29, gives 1. That is added to the address of x to
get the low word of x.
diff --git a/src/lisp/e_cosh.c b/src/lisp/e_cosh.c
index f022ec0..28b6c3c 100644
--- a/src/lisp/e_cosh.c
+++ b/src/lisp/e_cosh.c
@@ -78,7 +78,11 @@ static double one = 1.0, half=0.5, huge = 1.0e300;
if (ix < 0x40862E42) return half*__ieee754_exp(fabs(x));
/* |x| in [log(maxdouble), overflowthresold] */
+#if 0
lx = *( (((*(unsigned*)&one)>>29)) + (unsigned*)&x);
+#else
+ lx = ux.i[LOWORD];
+#endif
if (ix<0x408633CE ||
((ix==0x408633ce)&&(lx<=(unsigned)0x8fb9f87d))) {
w = __ieee754_exp(half*fabs(x));
diff --git a/src/lisp/e_sinh.c b/src/lisp/e_sinh.c
index 8444741..76b3418 100644
--- a/src/lisp/e_sinh.c
+++ b/src/lisp/e_sinh.c
@@ -72,7 +72,11 @@ static double one = 1.0, shuge = 1.0e307;
if (ix < 0x40862E42) return h*__ieee754_exp(fabs(x));
/* |x| in [log(maxdouble), overflowthresold] */
+#if 0
lx = *( (((*(unsigned*)&one)>>29)) + (unsigned*)&x);
+#else
+ lx = ux.i[LOWORD];
+#endif
if (ix<0x408633CE || ((ix==0x408633ce)&&(lx<=(unsigned)0x8fb9f87d))) {
w = __ieee754_exp(0.5*fabs(x));
t = h*w;
-----------------------------------------------------------------------
Summary of changes:
src/lisp/e_cosh.c | 4 ++++
src/lisp/e_sinh.c | 4 ++++
2 files changed, 8 insertions(+)
hooks/post-receive
--
CMU Common Lisp
More information about the cmucl-cvs
mailing list