X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fx86%2Farith.lisp;h=949d73b337e8fd19f90d1d8e0f1651e1267e0ed4;hb=bc46c8bcdd6ac8918df8ea9e9db49808e4924fcf;hp=ee9678262fb9cb34b262eb4f82c6d2a1ccb62c10;hpb=50305b602c3953440af716137a56f50cd204375d;p=sbcl.git diff --git a/src/compiler/x86/arith.lisp b/src/compiler/x86/arith.lisp index ee96782..949d73b 100644 --- a/src/compiler/x86/arith.lisp +++ b/src/compiler/x86/arith.lisp @@ -842,28 +842,28 @@ (macrolet ((define-conditional-vop (tran cond unsigned not-cond not-unsigned) `(progn ,@(mapcar - #'(lambda (suffix cost signed) - `(define-vop (;; FIXME: These could be done more - ;; cleanly with SYMBOLICATE. - ,(intern (format nil "~:@(FAST-IF-~A~A~)" - tran suffix)) - ,(intern - (format nil "~:@(FAST-CONDITIONAL~A~)" - suffix))) - (:translate ,tran) - (:generator ,cost - (inst cmp x - ,(if (eq suffix '-c/fixnum) - '(fixnumize y) - 'y)) - (inst jmp (if not-p - ,(if signed - not-cond - not-unsigned) - ,(if signed - cond - unsigned)) - target)))) + (lambda (suffix cost signed) + `(define-vop (;; FIXME: These could be done more + ;; cleanly with SYMBOLICATE. + ,(intern (format nil "~:@(FAST-IF-~A~A~)" + tran suffix)) + ,(intern + (format nil "~:@(FAST-CONDITIONAL~A~)" + suffix))) + (:translate ,tran) + (:generator ,cost + (inst cmp x + ,(if (eq suffix '-c/fixnum) + '(fixnumize y) + 'y)) + (inst jmp (if not-p + ,(if signed + not-cond + not-unsigned) + ,(if signed + cond + unsigned)) + target)))) '(/fixnum -c/fixnum /signed -c/signed /unsigned -c/unsigned) '(4 3 6 5 6 5) '(t t t t nil nil))))) @@ -1004,7 +1004,7 @@ (move r x) (inst and r y))) -(def-source-transform 32bit-logical-nand (x y) +(define-source-transform 32bit-logical-nand (x y) `(32bit-logical-not (32bit-logical-and ,x ,y))) (define-vop (32bit-logical-or 32bit-logical) @@ -1013,7 +1013,7 @@ (move r x) (inst or r y))) -(def-source-transform 32bit-logical-nor (x y) +(define-source-transform 32bit-logical-nor (x y) `(32bit-logical-not (32bit-logical-or ,x ,y))) (define-vop (32bit-logical-xor 32bit-logical) @@ -1022,19 +1022,19 @@ (move r x) (inst xor r y))) -(def-source-transform 32bit-logical-eqv (x y) +(define-source-transform 32bit-logical-eqv (x y) `(32bit-logical-not (32bit-logical-xor ,x ,y))) -(def-source-transform 32bit-logical-orc1 (x y) +(define-source-transform 32bit-logical-orc1 (x y) `(32bit-logical-or (32bit-logical-not ,x) ,y)) -(def-source-transform 32bit-logical-orc2 (x y) +(define-source-transform 32bit-logical-orc2 (x y) `(32bit-logical-or ,x (32bit-logical-not ,y))) -(def-source-transform 32bit-logical-andc1 (x y) +(define-source-transform 32bit-logical-andc1 (x y) `(32bit-logical-and (32bit-logical-not ,x) ,y)) -(def-source-transform 32bit-logical-andc2 (x y) +(define-source-transform 32bit-logical-andc2 (x y) `(32bit-logical-and ,x (32bit-logical-not ,y))) ;;; Only the lower 5 bits of the shift amount are significant. @@ -1296,14 +1296,14 @@ ;;;; static functions -(define-static-function two-arg-/ (x y) :translate /) +(define-static-fun two-arg-/ (x y) :translate /) -(define-static-function two-arg-gcd (x y) :translate gcd) -(define-static-function two-arg-lcm (x y) :translate lcm) +(define-static-fun two-arg-gcd (x y) :translate gcd) +(define-static-fun two-arg-lcm (x y) :translate lcm) -(define-static-function two-arg-and (x y) :translate logand) -(define-static-function two-arg-ior (x y) :translate logior) -(define-static-function two-arg-xor (x y) :translate logxor) +(define-static-fun two-arg-and (x y) :translate logand) +(define-static-fun two-arg-ior (x y) :translate logior) +(define-static-fun two-arg-xor (x y) :translate logxor) ;;; Support for the Mersenne Twister, MT19937, random number generator