projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
1.0.44.13: x86: Implement ANCESTOR-FRAME VOPs.
[sbcl.git]
/
src
/
compiler
/
x86-64
/
arith.lisp
diff --git
a/src/compiler/x86-64/arith.lisp
b/src/compiler/x86-64/arith.lisp
index
cfe4ad4
..
cc41f3d
100644
(file)
--- a/
src/compiler/x86-64/arith.lisp
+++ b/
src/compiler/x86-64/arith.lisp
@@
-667,6
+667,8
@@
(location= number result)))))
(:result-types tagged-num)
(:note "inline ASH")
(location= number result)))))
(:result-types tagged-num)
(:note "inline ASH")
+ (:variant nil)
+ (:variant-vars modularp)
(:generator 2
(cond ((and (= amount 1) (not (location= number result)))
(inst lea result (make-ea :qword :base number :index number)))
(:generator 2
(cond ((and (= amount 1) (not (location= number result)))
(inst lea result (make-ea :qword :base number :index number)))
@@
-685,8
+687,11
@@
(inst sar result (- amount))
(inst and result (lognot fixnum-tag-mask)))))
((plusp amount)
(inst sar result (- amount))
(inst and result (lognot fixnum-tag-mask)))))
((plusp amount)
+ (unless modularp
+ (aver (not "Impossible: fixnum ASH should not be called with
+constant shift greater than word length")))
(if (sc-is result any-reg)
(if (sc-is result any-reg)
- (inst xor result result)
+ (zeroize result)
(inst mov result 0)))
(t (inst sar result 63)
(inst and result (lognot fixnum-tag-mask))))))))
(inst mov result 0)))
(t (inst sar result 63)
(inst and result (lognot fixnum-tag-mask))))))))
@@
-1367,6
+1372,7
@@
(define-vop (fast-ash-left-smod61-c/fixnum=>fixnum
fast-ash-c/fixnum=>fixnum)
(define-vop (fast-ash-left-smod61-c/fixnum=>fixnum
fast-ash-c/fixnum=>fixnum)
+ (:variant :modular)
(:translate ash-left-smod61))
(define-vop (fast-ash-left-smod61/fixnum=>fixnum
fast-ash-left/fixnum=>fixnum))
(:translate ash-left-smod61))
(define-vop (fast-ash-left-smod61/fixnum=>fixnum
fast-ash-left/fixnum=>fixnum))