[git] CMU Common Lisp branch master updated. snapshot-2013-12-a-2-gb728040

Raymond Toy rtoy at common-lisp.net
Sun Dec 15 21:19:51 UTC 2013


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  b7280406f5f91cdd6ffc8dcacc9e811317a9a99b (commit)
      from  e2c9ecef46e95a79ad7655702088ec1c976267dd (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 b7280406f5f91cdd6ffc8dcacc9e811317a9a99b
Author: Raymond Toy <toy.raymond at gmail.com>
Date:   Sun Dec 15 13:18:35 2013 -0800

    Need -ffloat-store when compiling e_rem/k_rem.
    
     * Add CC_REM_PIO2 variable when compiling e_rem_pio2.c and
       k_rem_pio2.c.
     * On linux and freebsd, set CC_REM_PIO2 to -ffloat-store so that
       proper rounding happens.  Not needed on Darwin because Darwin
       always uses sse2 and not x87.

diff --git a/src/lisp/Config.x86_common b/src/lisp/Config.x86_common
index 6f0ec95..f263d40 100644
--- a/src/lisp/Config.x86_common
+++ b/src/lisp/Config.x86_common
@@ -65,7 +65,13 @@ NM = nm -gp
 DEPEND_FLAGS = -MM
 
 # This no longer has aliasing problems, so no need to use
-# -ffloat-store and -fno-strict-aliasing anymore.
+# -fno-strict-aliasing anymore.  However, if we're building with x87,
+# we MUST use -ffloat-store to get proper double-float rounding.
 e_rem_pio2.o : e_rem_pio2.c
-	$(CC) -c $(CFLAGS) $(CPPFLAGS) $<
+	$(CC) -c $(CFLAGS) $(CPPFLAGS) $(CC_REM_PIO2) $<
+
+k_rem_pio2.o : k_rem_pio2.c
+	$(CC) -c $(CFLAGS) $(CPPFLAGS) $(CC_REM_PIO2) $<
+
+
 
diff --git a/src/lisp/Config.x86_freebsd b/src/lisp/Config.x86_freebsd
index a050e50..911e2c2 100644
--- a/src/lisp/Config.x86_freebsd
+++ b/src/lisp/Config.x86_freebsd
@@ -1,6 +1,10 @@
 # -*- Mode: makefile -*-
 include Config.x86_common
 
+# Need -ffloat-store for e_rem_pio2 and k_rem_pio2 to get properly
+# rounded double-floats while using x87 extended precision.
+CC_REM_PIO2 = -ffloat-store
+
 UNDEFSYMPATTERN = -Xlinker -u -Xlinker &
 OS_SRC += FreeBSD-os.c elf.c
 OS_LINK_FLAGS = -dynamic -export-dynamic
diff --git a/src/lisp/Config.x86_linux b/src/lisp/Config.x86_linux
index 569f4f5..13eb012 100644
--- a/src/lisp/Config.x86_linux
+++ b/src/lisp/Config.x86_linux
@@ -3,6 +3,10 @@ include Config.x86_common
 
 CPPFLAGS += -m32 -rdynamic -D__NO_CTYPE -D_GNU_SOURCE
 
+# Need -ffloat-store for e_rem_pio2 and k_rem_pio2 to get properly
+# rounded double-floats while using x87 extended precision.
+CC_REM_PIO2 = -ffloat-store
+
 UNDEFSYMPATTERN = -Xlinker -u -Xlinker &
 ASSEM_SRC +=  linux-stubs.S
 OS_SRC += Linux-os.c elf.c

-----------------------------------------------------------------------

Summary of changes:
 src/lisp/Config.x86_common  |   10 ++++++++--
 src/lisp/Config.x86_freebsd |    4 ++++
 src/lisp/Config.x86_linux   |    4 ++++
 3 files changed, 16 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
CMU Common Lisp



More information about the cmucl-cvs mailing list