projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
1.0.34.11: properly inline %UNARY-TRUNCATE/{SINGLE,DOUBLE}-FLOAT
[sbcl.git]
/
src
/
compiler
/
x86
/
arith.lisp
diff --git
a/src/compiler/x86/arith.lisp
b/src/compiler/x86/arith.lisp
index
d16a2ff
..
4abd9c6
100644
(file)
--- a/
src/compiler/x86/arith.lisp
+++ b/
src/compiler/x86/arith.lisp
@@
-359,7
+359,7
@@
(:note "inline fixnum arithmetic")
(:generator 4
(move r x)
(:note "inline fixnum arithmetic")
(:generator 4
(move r x)
- (inst sar r 2)
+ (inst sar r n-fixnum-tag-bits)
(inst imul r y)))
(define-vop (fast-*-c/fixnum=>fixnum fast-safe-arith-op)
(inst imul r y)))
(define-vop (fast-*-c/fixnum=>fixnum fast-safe-arith-op)
@@
-445,8
+445,9
@@
(inst cdq)
(inst idiv eax y)
(if (location= quo eax)
(inst cdq)
(inst idiv eax y)
(if (location= quo eax)
- (inst shl eax 2)
- (inst lea quo (make-ea :dword :index eax :scale 4)))
+ (inst shl eax n-fixnum-tag-bits)
+ (inst lea quo (make-ea :dword :index eax
+ :scale (ash 1 n-fixnum-tag-bits))))
(move rem edx)))
(define-vop (fast-truncate-c/fixnum=>fixnum fast-safe-arith-op)
(move rem edx)))
(define-vop (fast-truncate-c/fixnum=>fixnum fast-safe-arith-op)
@@
-471,8
+472,9
@@
(inst mov y-arg (fixnumize y))
(inst idiv eax y-arg)
(if (location= quo eax)
(inst mov y-arg (fixnumize y))
(inst idiv eax y-arg)
(if (location= quo eax)
- (inst shl eax 2)
- (inst lea quo (make-ea :dword :index eax :scale 4)))
+ (inst shl eax n-fixnum-tag-bits)
+ (inst lea quo (make-ea :dword :index eax
+ :scale (ash 1 n-fixnum-tag-bits))))
(move rem edx)))
(define-vop (fast-truncate/unsigned=>unsigned fast-safe-arith-op)
(move rem edx)))
(define-vop (fast-truncate/unsigned=>unsigned fast-safe-arith-op)
@@
-1581,7
+1583,7
@@
(:result-types unsigned-num)
(:generator 1
(move digit fixnum)
(:result-types unsigned-num)
(:generator 1
(move digit fixnum)
- (inst sar digit 2)))
+ (inst sar digit n-fixnum-tag-bits)))
(define-vop (bignum-floor)
(:translate sb!bignum:%floor)
(define-vop (bignum-floor)
(:translate sb!bignum:%floor)
@@
-1617,7
+1619,7
@@
(:generator 1
(move res digit)
(when (sc-is res any-reg control-stack)
(:generator 1
(move res digit)
(when (sc-is res any-reg control-stack)
- (inst shl res 2))))
+ (inst shl res n-fixnum-tag-bits))))
(define-vop (digit-ashr)
(:translate sb!bignum:%ashr)
(define-vop (digit-ashr)
(:translate sb!bignum:%ashr)