Raymond Toy pushed to branch master at cmucl / cmucl
Commits:
2482e5f0 by Raymond Toy at 2016-09-03T10:55:25-07:00
Fix #28: Recursive function definition in cross-compile
The recursive definition comes from %single-float and %double-float
trying to coerce a double-double-float to a single or double. Not
sure the best place to fix this, but added a special case here for
%single-float and %double-float to convert the double-double-float to
a double that can then be coerced to the appropriate type. (Could
have added a deftransform for coerce to handle double-doubles, but
doing it here makes it easier to follow the code.)
Verified that x86->x86 and sparc->sparc cross-compiles no longer have
the warning. Also verified that sparc->sparc actually cross-compiles
and loads successfully and that the result will compile itself
successfully.
- - - - -
6c86016d by Raymond Toy at 2016-09-03T10:59:29-07:00
Add comment.
- - - - -
a8934d15 by Raymond Toy at 2016-09-03T18:01:25+00:00
Merge branch 'rtoy-28-fix-recursive-fcn-defn' into 'master'
Fix #28: Recursive function definition
Convert a `double-double` to a double before coercing to a `single-float` or `double-float`.
See merge request !9
- - - - -
1 changed file:
- src/code/float.lisp
Changes:
=====================================
src/code/float.lisp
=====================================
--- a/src/code/float.lisp
+++ b/src/code/float.lisp
@@ -1047,9 +1047,15 @@
(number-dispatch ((x real))
(((foreach single-float double-float
#+long-float long-float
- #+double-double double-double-float
fixnum))
(coerce x ',type))
+ #+double-double
+ ((double-double-float)
+ ;; Convert the double-double to a double before
+ ;; coercing to the appropriate type.
+ (coerce (+ (double-double-hi x)
+ (double-double-lo x))
+ ',type))
((bignum)
(bignum-to-float x ',type))
((ratio)
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/compare/5beb6431855908e9010c36bc…
Raymond Toy pushed to branch rtoy-28-fix-recursive-fcn-defn at cmucl / cmucl
Commits:
6c86016d by Raymond Toy at 2016-09-03T10:59:29-07:00
Add comment.
- - - - -
1 changed file:
- src/code/float.lisp
Changes:
=====================================
src/code/float.lisp
=====================================
--- a/src/code/float.lisp
+++ b/src/code/float.lisp
@@ -1051,6 +1051,8 @@
(coerce x ',type))
#+double-double
((double-double-float)
+ ;; Convert the double-double to a double before
+ ;; coercing to the appropriate type.
(coerce (+ (double-double-hi x)
(double-double-lo x))
',type))
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/commit/6c86016d677e5a39fc3fe2ddc…