From: Christophe R. <cr...@us...> - 2003-09-16 12:07:46
|
Update of /cvsroot/sbcl/sbcl/src/compiler/x86 In directory sc8-pr-cvs1:/tmp/cvs-serv7388/src/compiler/x86 Modified Files: arith.lisp Log Message: 0.8.3.72: Merge modular_arithmetic_branch ... include untested modular arithmetic implementation for hppa ... unkludge sb-md5: now implemented using natural, high-level lisp. (and as a bonus, compiles to shorter code on x86 at least). ... passes self-tests and pfdietz-tests on x86 at least. More exhaustive testing on other platforms is probably needed, maybe with the torturer Index: arith.lisp =================================================================== RCS file: /cvsroot/sbcl/sbcl/src/compiler/x86/arith.lisp,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- arith.lisp 15 Sep 2003 09:21:39 -0000 1.18 +++ arith.lisp 16 Sep 2003 12:07:41 -0000 1.19 @@ -184,7 +184,6 @@ (define-binop logior 2 or) (define-binop logxor 2 xor)) - ;;; Special handling of add on the x86; can use lea to avoid a ;;; register load, otherwise it uses add. (define-vop (fast-+/fixnum=>fixnum fast-safe-arith-op) @@ -1170,6 +1169,23 @@ (define-vop (fast-logxor-mod32-c/unsigned=>unsigned fast-logxor-c/unsigned=>unsigned) (:translate logxor-mod32)) + +(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))) ;;;; bignum stuff |