(if (< x 0) x (foo (1- x))))
SBCL generates a full call of FOO (but CMUCL does not).
+
+Partial explanation: CMUCL does generate a full (tail) call to FOO if
+*BLOCK-COMPILE* is NIL. Maybe this is because in that case CMUCL doesn't
+generate a temporary(?) function in its IR1-TRANSLATOR for %DEFUN?
--------------------------------------------------------------------------------
#8
(defun foo (d)
-2;;;
-;;; Written by Rob MacLachlan
-;;; Sparc conversion by William Lott.
-;;;
-(in-package "SB!VM")
+;;;; floating point support for the PPC
+
+;;;; This software is part of the SBCL system. See the README file for
+;;;; more information.
+;;;;
+;;;; This software is derived from the CMU CL system, which was
+;;;; written at Carnegie Mellon University and released into the
+;;;; public domain. The software is in the public domain and is
+;;;; provided with absolutely no warranty. See the COPYING and CREDITS
+;;;; files for more information.
+(in-package "SB!VM")
\f
;;;; Move functions:
:offset (tn-offset x)))
(defun complex-double-reg-imag-tn (x)
(make-random-tn :kind :normal :sc (sc-or-lose 'double-reg)
- :offset (+ (tn-offset x) 2)))
+ :offset (1+ (tn-offset x))))
(define-move-fun (load-complex-single 2) (vop x y)
((< nargs (min min1 min2))
(compiler-warn "Too few arguments (~D) to ~S ~S ~S: ~
requires at least ~D."
- nargs 'cerror report control min))
+ nargs 'cerror report control (min min1 min2)))
((> nargs (max max1 max2))
(;; to get warned about probably bogus code at
;; cross-compile time.
;; run-time error.
#-sb-xc-host compiler-style-warn
"Too many arguments (~D) to ~S ~S ~S: uses at most ~D."
- nargs 'cerror report control max))))))))
+ nargs 'cerror report control (max max1 max2)))))))))
(give-up-ir1-transform))
(defoptimizer (coerce derive-type) ((value type))
#(2.0d0 2.0d0)
#(3.0d0 3.0d0))))
+(defun complex-double-float-ppc (x y)
+ (declare (type (complex double-float) x y))
+ (declare (optimize speed))
+ (+ x y))
+(compile 'complex-double-float-ppc)
+(assert (= (complex-double-float-ppc #c(0.0d0 1.0d0) #c(2.0d0 3.0d0))
+ #c(2.0d0 4.0d0)))
+
;;; success
(quit :unix-status 104)
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.8.2.29"
+"0.8.2.30"