least some of them are indicative of potentially thread-unsafe
parts of the system. See doc/internals/notes/threading-specials
-285: PPC randomness
- In SBCL 0.8.3.1x on a powerpc running Linux (dunno if Darwin is
- similarly affected):
- * (dotimes (i 100) (random 1663553320000000))
-
- NIL
- * (dotimes (i 100) (random 1663553340000000))
-
- NIL
- * (dotimes (i 100) (random 1663553350000000))
-
- debugger invoked on condition of type TYPE-ERROR:
- The value -30653269094906
- is not of type
- (OR (SINGLE-FLOAT 0.0) (DOUBLE-FLOAT 0.0d0) (RATIONAL 0)).
-
- and, weirdly, the frame is:
- ("hairy arg processor for top level local call RANDOM"
- 1663553347392000
- #S(RANDOM-STATE
- :STATE #(0 2567483615 188 1503590015 2333049409 322761517 ...)))
-
- (the type error doesn't seem to be terribly deterministic in when it
- occurs. Bigger numbers seem better able to trigger the error)
-
286: "recursive known functions"
Self-call recognition conflicts with known function
recognition. Currently cross compiler and target COMPILE do not
(reported by Rainer Joswig)
* bug fix: ASH on an (UNSIGNED-BYTE 32) with a shift of -32 or lower
no longer ever returns 1 instead of 0. (thanks to Lars Brinkhoff)
+ * fixed bug 285: TRUNCATE on bignum arguments, and indeed bignum
+ arithmetic in general, is now much more reliable on the PPC
+ platform.
* optimization: restored some effective method precomputation in
CLOS (turned off by an ANSI fix in sbcl-0.8.3); the amount of
precomputation is now tunable.
(define-vop (bignum-mult)
(:translate sb!bignum::%multiply)
(:policy :fast-safe)
- (:args (x :scs (unsigned-reg) :to (:result 1))
- (y :scs (unsigned-reg) :to (:result 1)))
+ (:args (x :scs (unsigned-reg) :to (:eval 1))
+ (y :scs (unsigned-reg) :to (:eval 1)))
(:arg-types unsigned-num unsigned-num)
- (:results (hi :scs (unsigned-reg))
- (lo :scs (unsigned-reg)))
+ (:results (hi :scs (unsigned-reg) :from (:eval 1))
+ (lo :scs (unsigned-reg) :from (:eval 0)))
(:result-types unsigned-num unsigned-num)
(:generator 40
(inst mullw lo x y)
(temp-offset-low (* (1+ stack-offset) sb!vm:n-word-bytes)))
(inst lis rtemp #x4330) ; High word of magic constant
(inst stw rtemp nfp-tn temp-offset-high)
- (inst lis rtemp #x-8000)
+ (inst lis rtemp #x8000)
(inst stw rtemp nfp-tn temp-offset-low)
(inst lfd fmagic nfp-tn temp-offset-high)
(inst xor rtemp rtemp x) ; invert sign bit of x : rtemp had #x80000000
(multiple-value-bind (other-reads other-writes) (classify-dependencies other-dependencies)
`(define-instruction ,name (segment rt ra si)
(:declare (type (or ,@(when fixup '(fixup))
- (signed-byte 16)) si))
+ (unsigned-byte 16) (signed-byte 16))
+ si))
(:printer d-si ((op ,op)))
(:delay ,cost)
(:cost ,cost)
(assert (= (gcd 0 x) (abs x))))
;;; LCM returns a non-negative number
(assert (= (lcm 4 -10) 20))
+
+;;; PPC bignum arithmetic bug:
+(multiple-value-bind (quo rem)
+ (truncate 291351647815394962053040658028983955 10000000000000000000000000)
+ (assert (= quo 29135164781))
+ (assert (= rem 5394962053040658028983955)))
;;; 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.3.44"
+"0.8.3.45"