X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fmips%2Farith.lisp;h=93e0bf6fec80f91fbb5e794d1fd231c08e2e67cd;hb=3fe0010d2777b41e01ea9b4a0f894cfa40f7df1b;hp=9d13c9399f4fb503081f175a281763abe34d5021;hpb=cb79d726de3e18c660f84c58a43f00d22b459037;p=sbcl.git diff --git a/src/compiler/mips/arith.lisp b/src/compiler/mips/arith.lisp index 9d13c93..93e0bf6 100644 --- a/src/compiler/mips/arith.lisp +++ b/src/compiler/mips/arith.lisp @@ -160,15 +160,24 @@ (define-binop logand 1 3 and (unsigned-byte 14) (unsigned-byte 16)) (define-binop logxor 1 3 xor (unsigned-byte 14) (unsigned-byte 16)) -;;; KLUDGE: no FIXNUM VOP for LOGNOR, because there's no efficient way -;;; of restoring the tag bits. (No -C/ VOPs for LOGNOR because the -;;; NOR instruction doesn't take immediate args). -- CSR, 2003-09-11 +;;; No -C/ VOPs for LOGNOR because the NOR instruction doesn't take +;;; immediate args. -- CSR, 2003-09-11 +(define-vop (fast-lognor/fixnum=>fixnum fast-fixnum-binop) + (:translate lognor) + (:args (x :target r :scs (any-reg)) + (y :target r :scs (any-reg))) + (:temporary (:sc non-descriptor-reg) temp) + (:generator 4 + (inst nor temp x y) + (inst addu r temp (- fixnum-tag-mask)))) + (define-vop (fast-lognor/signed=>signed fast-signed-binop) (:translate lognor) (:args (x :target r :scs (signed-reg)) (y :target r :scs (signed-reg))) (:generator 4 (inst nor r x y))) + (define-vop (fast-lognor/unsigned=>unsigned fast-unsigned-binop) (:translate lognor) (:args (x :target r :scs (unsigned-reg)) @@ -229,7 +238,7 @@ (inst bne temp zero-tn done) (inst srl result number ndesc) (inst b done) - (inst move result zero-tn) + (move result zero-tn t) POSITIVE ;; The result-type assures us that this shift will not overflow. @@ -331,7 +340,7 @@ (test (gen-label))) (move shift arg) (inst bgez shift test) - (move res zero-tn) + (move res zero-tn t) (inst b test) (inst nor shift shift)