Update of /cvsroot/sbcl/sbcl/src/compiler/x86
In directory sc8-pr-cvs1:/tmp/cvs-serv26196/src/compiler/x86
Modified Files:
Tag: modular_arithmetic_branch
arith.lisp
Log Message:
0.8.3.45.modular2:
Restore buildability on x86
... define essentially the same source transforms as were
deleted to make the PPC version efficient.
... KLUDGE: the full call version of LOGEQV is now inefficient;
first the arguments get associated into logeqv pairs;
then (LOGNOT (LOGXOR .. ..)) is done on each pair.
Since user code gets transformed to efficiency, this
isn't so bad... only (funcall #'logeqv .. .. ..)
exhibits this problem.
Index: arith.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/src/compiler/x86/arith.lisp,v
retrieving revision 1.17
retrieving revision 1.17.2.1
diff -u -d -r1.17 -r1.17.2.1
--- arith.lisp 4 Sep 2003 15:05:34 -0000 1.17
+++ arith.lisp 9 Sep 2003 16:49:05 -0000 1.17.2.1
@@ -184,6 +184,22 @@
(define-binop logior 2 or)
(define-binop logxor 2 xor))
+(define-source-transform logeqv (&rest args)
+ (if (oddp (length args))
+ `(logxor ,@args)
+ `(lognot (logxor ,@args))))
+(define-source-transform logandc1 (x y)
+ `(logand (lognot ,x) ,y))
+(define-source-transform logandc2 (x y)
+ `(logand ,x (lognot ,y)))
+(define-source-transform logorc1 (x y)
+ `(logior (lognot ,x) ,y))
+(define-source-transform logorc2 (x y)
+ `(logior ,x (lognot ,y)))
+(define-source-transform lognor (x y)
+ `(lognot (logior ,x ,y)))
+(define-source-transform lognand (x y)
+ `(lognot (logand ,x ,y)))
;;; Special handling of add on the x86; can use lea to avoid a
;;; register load, otherwise it uses add.
|