projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
0.8.7.6:
[sbcl.git]
/
src
/
compiler
/
alpha
/
arith.lisp
diff --git
a/src/compiler/alpha/arith.lisp
b/src/compiler/alpha/arith.lisp
index
7f2a0bd
..
fccb1f0
100644
(file)
--- a/
src/compiler/alpha/arith.lisp
+++ b/
src/compiler/alpha/arith.lisp
@@
-196,7
+196,7
@@
(:translate ash)
(:policy :fast-safe)
(:temporary (:sc non-descriptor-reg) ndesc)
(:translate ash)
(:policy :fast-safe)
(:temporary (:sc non-descriptor-reg) ndesc)
- (:temporary (:sc non-descriptor-reg :to :eval) temp)
+ (:temporary (:sc non-descriptor-reg) temp)
(:generator 3
(inst bge amount positive)
(inst subq zero-tn amount ndesc)
(:generator 3
(inst bge amount positive)
(inst subq zero-tn amount ndesc)
@@
-223,7
+223,7
@@
(:translate ash)
(:policy :fast-safe)
(:temporary (:sc non-descriptor-reg) ndesc)
(:translate ash)
(:policy :fast-safe)
(:temporary (:sc non-descriptor-reg) ndesc)
- (:temporary (:sc non-descriptor-reg :to :eval) temp)
+ (:temporary (:sc non-descriptor-reg) temp)
(:generator 3
(inst bge amount positive)
(inst subq zero-tn amount ndesc)
(:generator 3
(inst bge amount positive)
(inst subq zero-tn amount ndesc)
@@
-249,8
+249,8
@@
(:result-types signed-num)
(:generator 1
(cond
(:result-types signed-num)
(:generator 1
(cond
- ((< count 0) (inst sra number (- count) result))
- ((> count 0) (inst sll number count result))
+ ((< count 0) (inst sra number (min 63 (- count)) result))
+ ((> count 0) (inst sll number (min 63 count) result))
(t (bug "identity ASH not transformed away")))))
(define-vop (fast-ash-c/unsigned=>unsigned)
(t (bug "identity ASH not transformed away")))))
(define-vop (fast-ash-c/unsigned=>unsigned)
@@
-266,7
+266,7
@@
(cond
((< count -63) (move zero-tn result))
((< count 0) (inst sra number (- count) result))
(cond
((< count -63) (move zero-tn result))
((< count 0) (inst sra number (- count) result))
- ((> count 0) (inst sll number count result))
+ ((> count 0) (inst sll number (min 63 count) result))
(t (bug "identity ASH not transformed away")))))
(define-vop (signed-byte-64-len)
(t (bug "identity ASH not transformed away")))))
(define-vop (signed-byte-64-len)
@@
-364,11
+364,15
@@
(:generator 1
(inst not x res)))
(:generator 1
(inst not x res)))
+(define-vop (fast-ash-left-mod64-c/unsigned=>unsigned
+ fast-ash-c/unsigned=>unsigned)
+ (:translate ash-left-mod64))
+
(macrolet
((define-modular-backend (fun &optional constantp)
(let ((mfun-name (symbolicate fun '-mod64))
(modvop (symbolicate 'fast- fun '-mod64/unsigned=>unsigned))
(macrolet
((define-modular-backend (fun &optional constantp)
(let ((mfun-name (symbolicate fun '-mod64))
(modvop (symbolicate 'fast- fun '-mod64/unsigned=>unsigned))
- (modcvop (symbolicate 'fast- fun 'mod64-c/unsigned=>unsigned))
+ (modcvop (symbolicate 'fast- fun '-mod64-c/unsigned=>unsigned))
(vop (symbolicate 'fast- fun '/unsigned=>unsigned))
(cvop (symbolicate 'fast- fun '-c/unsigned=>unsigned)))
`(progn
(vop (symbolicate 'fast- fun '/unsigned=>unsigned))
(cvop (symbolicate 'fast- fun '-c/unsigned=>unsigned)))
`(progn
@@
-379,6
+383,7
@@
`((define-vop (,modcvop ,cvop)
(:translate ,mfun-name))))))))
(define-modular-backend + t)
`((define-vop (,modcvop ,cvop)
(:translate ,mfun-name))))))))
(define-modular-backend + t)
+ (define-modular-backend - t)
(define-modular-backend logxor t)
(define-modular-backend logeqv t)
(define-modular-backend logandc1)
(define-modular-backend logxor t)
(define-modular-backend logeqv t)
(define-modular-backend logandc1)
@@
-640,21
+645,21
@@
;;;; bignum stuff
(define-vop (bignum-length get-header-data)
;;;; bignum stuff
(define-vop (bignum-length get-header-data)
- (:translate sb!bignum::%bignum-length)
+ (:translate sb!bignum:%bignum-length)
(:policy :fast-safe))
(define-vop (bignum-set-length set-header-data)
(:policy :fast-safe))
(define-vop (bignum-set-length set-header-data)
- (:translate sb!bignum::%bignum-set-length)
+ (:translate sb!bignum:%bignum-set-length)
(:policy :fast-safe))
(define-full-reffer bignum-ref * bignum-digits-offset other-pointer-lowtag
(:policy :fast-safe))
(define-full-reffer bignum-ref * bignum-digits-offset other-pointer-lowtag
- (unsigned-reg) unsigned-num sb!bignum::%bignum-ref)
+ (unsigned-reg) unsigned-num sb!bignum:%bignum-ref)
(define-full-setter bignum-set * bignum-digits-offset other-pointer-lowtag
(define-full-setter bignum-set * bignum-digits-offset other-pointer-lowtag
- (unsigned-reg) unsigned-num sb!bignum::%bignum-set #!+gengc nil)
+ (unsigned-reg) unsigned-num sb!bignum:%bignum-set #!+gengc nil)
(define-vop (digit-0-or-plus)
(define-vop (digit-0-or-plus)
- (:translate sb!bignum::%digit-0-or-plusp)
+ (:translate sb!bignum:%digit-0-or-plusp)
(:policy :fast-safe)
(:args (digit :scs (unsigned-reg)))
(:arg-types unsigned-num)
(:policy :fast-safe)
(:args (digit :scs (unsigned-reg)))
(:arg-types unsigned-num)
@@
-668,7
+673,7
@@
(inst bge temp target))))
(define-vop (add-w/carry)
(inst bge temp target))))
(define-vop (add-w/carry)
- (:translate sb!bignum::%add-with-carry)
+ (:translate sb!bignum:%add-with-carry)
(:policy :fast-safe)
(:args (a :scs (unsigned-reg))
(b :scs (unsigned-reg))
(:policy :fast-safe)
(:args (a :scs (unsigned-reg))
(b :scs (unsigned-reg))
@@
-684,7
+689,7
@@
(inst mskll result 4 result)))
(define-vop (sub-w/borrow)
(inst mskll result 4 result)))
(define-vop (sub-w/borrow)
- (:translate sb!bignum::%subtract-with-borrow)
+ (:translate sb!bignum:%subtract-with-borrow)
(:policy :fast-safe)
(:args (a :scs (unsigned-reg))
(b :scs (unsigned-reg))
(:policy :fast-safe)
(:args (a :scs (unsigned-reg))
(b :scs (unsigned-reg))
@@
-702,7
+707,7
@@
(inst mskll result 4 result)))
(define-vop (bignum-mult-and-add-3-arg)
(inst mskll result 4 result)))
(define-vop (bignum-mult-and-add-3-arg)
- (:translate sb!bignum::%multiply-and-add)
+ (:translate sb!bignum:%multiply-and-add)
(:policy :fast-safe)
(:args (x :scs (unsigned-reg))
(y :scs (unsigned-reg))
(:policy :fast-safe)
(:args (x :scs (unsigned-reg))
(y :scs (unsigned-reg))
@@
-719,7
+724,7
@@
(define-vop (bignum-mult-and-add-4-arg)
(define-vop (bignum-mult-and-add-4-arg)
- (:translate sb!bignum::%multiply-and-add)
+ (:translate sb!bignum:%multiply-and-add)
(:policy :fast-safe)
(:args (x :scs (unsigned-reg))
(y :scs (unsigned-reg))
(:policy :fast-safe)
(:args (x :scs (unsigned-reg))
(y :scs (unsigned-reg))
@@
-737,7
+742,7
@@
(inst mskll lo 4 lo)))
(define-vop (bignum-mult)
(inst mskll lo 4 lo)))
(define-vop (bignum-mult)
- (:translate sb!bignum::%multiply)
+ (:translate sb!bignum:%multiply)
(:policy :fast-safe)
(:args (x :scs (unsigned-reg))
(y :scs (unsigned-reg)))
(:policy :fast-safe)
(:args (x :scs (unsigned-reg))
(y :scs (unsigned-reg)))
@@
-751,7
+756,7
@@
(inst mskll lo 4 lo)))
(define-vop (bignum-lognot)
(inst mskll lo 4 lo)))
(define-vop (bignum-lognot)
- (:translate sb!bignum::%lognot)
+ (:translate sb!bignum:%lognot)
(:policy :fast-safe)
(:args (x :scs (unsigned-reg)))
(:arg-types unsigned-num)
(:policy :fast-safe)
(:args (x :scs (unsigned-reg)))
(:arg-types unsigned-num)
@@
-762,7
+767,7
@@
(inst mskll r 4 r)))
(define-vop (fixnum-to-digit)
(inst mskll r 4 r)))
(define-vop (fixnum-to-digit)
- (:translate sb!bignum::%fixnum-to-digit)
+ (:translate sb!bignum:%fixnum-to-digit)
(:policy :fast-safe)
(:args (fixnum :scs (any-reg)))
(:arg-types tagged-num)
(:policy :fast-safe)
(:args (fixnum :scs (any-reg)))
(:arg-types tagged-num)
@@
-772,7
+777,7
@@
(inst sra fixnum 2 digit)))
(define-vop (bignum-floor)
(inst sra fixnum 2 digit)))
(define-vop (bignum-floor)
- (:translate sb!bignum::%floor)
+ (:translate sb!bignum:%floor)
(:policy :fast-safe)
(:args (num-high :scs (unsigned-reg))
(num-low :scs (unsigned-reg))
(:policy :fast-safe)
(:args (num-high :scs (unsigned-reg))
(num-low :scs (unsigned-reg))
@@
-802,7
+807,7
@@
(emit-label shift2)))))
(define-vop (signify-digit)
(emit-label shift2)))))
(define-vop (signify-digit)
- (:translate sb!bignum::%fixnum-digit-with-correct-sign)
+ (:translate sb!bignum:%fixnum-digit-with-correct-sign)
(:policy :fast-safe)
(:args (digit :scs (unsigned-reg) :target res))
(:arg-types unsigned-num)
(:policy :fast-safe)
(:args (digit :scs (unsigned-reg) :target res))
(:arg-types unsigned-num)
@@
-819,7
+824,7
@@
(define-vop (digit-ashr)
(define-vop (digit-ashr)
- (:translate sb!bignum::%ashr)
+ (:translate sb!bignum:%ashr)
(:policy :fast-safe)
(:args (digit :scs (unsigned-reg))
(count :scs (unsigned-reg)))
(:policy :fast-safe)
(:args (digit :scs (unsigned-reg))
(count :scs (unsigned-reg)))
@@
-832,12
+837,12
@@
(inst srl result 32 result)))
(define-vop (digit-lshr digit-ashr)
(inst srl result 32 result)))
(define-vop (digit-lshr digit-ashr)
- (:translate sb!bignum::%digit-logical-shift-right)
+ (:translate sb!bignum:%digit-logical-shift-right)
(:generator 1
(inst srl digit count result)))
(define-vop (digit-ashl digit-ashr)
(:generator 1
(inst srl digit count result)))
(define-vop (digit-ashl digit-ashr)
- (:translate sb!bignum::%ashl)
+ (:translate sb!bignum:%ashl)
(:generator 1
(inst sll digit count result)))
\f
(:generator 1
(inst sll digit count result)))
\f