From: Christophe R. <cr...@us...> - 2005-07-04 10:09:03
|
Update of /cvsroot/sbcl/sbcl/src/compiler/mips In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8194/src/compiler/mips Modified Files: arith.lisp Log Message: 0.9.2.20: Better LOGNOR on fixnums for MIPS (THS sbcl-devel 2005-05-22) ... just subtract the mask Index: arith.lisp =================================================================== RCS file: /cvsroot/sbcl/sbcl/src/compiler/mips/arith.lisp,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- arith.lisp 19 Dec 2004 07:01:10 -0000 1.13 +++ arith.lisp 4 Jul 2005 10:08:49 -0000 1.14 @@ -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)) |