projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use new MAP-RESTARTS in FIND-RESTART, COMPUTE-RESTARTS; fix FIND-RESTART
[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
c50e0dd
..
f455bff
100644
(file)
--- a/
src/compiler/x86-64/arith.lisp
+++ b/
src/compiler/x86-64/arith.lisp
@@
-1328,13
+1328,17
@@
constant shift greater than word length")))
(:translate ,tran)
(:conditional ,(if signed cond unsigned))
(:generator ,cost
(:translate ,tran)
(:conditional ,(if signed cond unsigned))
(:generator ,cost
- (inst cmp x
- ,(case suffix
- (-c/fixnum
- `(constantize (fixnumize y)))
- ((-c/signed -c/unsigned)
- `(constantize y))
- (t 'y))))))
+ (cond ((and (sc-is x any-reg signed-reg unsigned-reg)
+ (eql y 0))
+ (inst test x x))
+ (t
+ (inst cmp x
+ ,(case suffix
+ (-c/fixnum
+ `(constantize (fixnumize y)))
+ ((-c/signed -c/unsigned)
+ `(constantize y))
+ (t 'y))))))))
'(/fixnum -c/fixnum /signed -c/signed /unsigned -c/unsigned)
; '(/fixnum /signed /unsigned)
'(4 3 6 5 6 5)
'(/fixnum -c/fixnum /signed -c/signed /unsigned -c/unsigned)
; '(/fixnum /signed /unsigned)
'(4 3 6 5 6 5)