X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fx86%2Farith.lisp;h=25d7091516689865b545ec57491501053c7d4e92;hb=6ab9c60f1c53cc7cc912d644658bc23453a82ac4;hp=565a2e920e6fcdfd7f6b4e6617fe26bd6cfd6304;hpb=201e598b805d3b8f3a1206bc487cbb25180cef30;p=sbcl.git diff --git a/src/compiler/x86/arith.lisp b/src/compiler/x86/arith.lisp index 565a2e9..25d7091 100644 --- a/src/compiler/x86/arith.lisp +++ b/src/compiler/x86/arith.lisp @@ -176,9 +176,16 @@ (:translate ,translate) (:generator ,untagged-penalty (move r x) - (inst ,op r y)))))) - - ;;(define-binop + 4 add) + ,(if (eq translate 'logand) + ;; for the -C/UNSIGNED=>UNSIGNED VOP, this case + ;; is optimized away as an identity somewhere + ;; along the lines. However, this VOP is used in + ;; -C/SIGNED=>UNSIGNED, below, when the + ;; higher-level lisp code can't optimize away the + ;; non-trivial identity. + `(unless (= y #.(1- (ash 1 n-word-bits))) + (inst ,op r y)) + `(inst ,op r y))))))) (define-binop - 4 sub) (define-binop logand 2 and) (define-binop logior 2 or) @@ -249,7 +256,6 @@ (move r x) (inst add r y))))) - ;;;; Special logand cases: (logand signed unsigned) => unsigned (define-vop (fast-logand/signed-unsigned=>unsigned