0.9.2.20:
authorChristophe Rhodes <csr21@cam.ac.uk>
Mon, 4 Jul 2005 10:08:44 +0000 (10:08 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Mon, 4 Jul 2005 10:08:44 +0000 (10:08 +0000)
Better LOGNOR on fixnums for MIPS (THS sbcl-devel 2005-05-22)
... just subtract the mask

NEWS
src/compiler/mips/arith.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index c7bf089..68cf096 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -14,6 +14,8 @@ changes in sbcl-0.9.3 relative to sbcl-0.9.2:
   * bug fix: out-of-line SB-SYS:FOREIGN-SYMBOL-ADDRESS did not work
     for variables on SBCL built with linkage-tables. (reported by Luis
     Oliveira)
+  * optimizations: LOGNOR on fixnums is improved in the MIPS backend.
+    (Thanks to Thiemo Seufer)
   * threads
     ** added x86-64 support
     ** incompatible change: the threading api now works with thread
index 9d13c93..ae219c5 100644 (file)
 (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))
index 8d7c6be..6aed87d 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.9.2.19"
+"0.9.2.20"