From adc6744c1ae16cc0a5f525429bc03539c5cb23c1 Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Mon, 4 Jul 2005 10:08:44 +0000 Subject: [PATCH] 0.9.2.20: Better LOGNOR on fixnums for MIPS (THS sbcl-devel 2005-05-22) ... just subtract the mask --- NEWS | 2 ++ src/compiler/mips/arith.lisp | 15 ++++++++++++--- version.lisp-expr | 2 +- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index c7bf089..68cf096 100644 --- 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 diff --git a/src/compiler/mips/arith.lisp b/src/compiler/mips/arith.lisp index 9d13c93..ae219c5 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)) diff --git a/version.lisp-expr b/version.lisp-expr index 8d7c6be..6aed87d 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -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" -- 1.7.10.4