X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fsparc%2Farith.lisp;h=b190cbaa2e975148f2300a223430e006f1cd1931;hb=9c510b74eca61bbcc2014dc2b1d02049dff50508;hp=a7f45f8ca639b44e0165bde0795c9cfcae4f009d;hpb=52cfe54802db8736f1f4e2b67764c43bba9b78b3;p=sbcl.git diff --git a/src/compiler/sparc/arith.lisp b/src/compiler/sparc/arith.lisp index a7f45f8..b190cba 100644 --- a/src/compiler/sparc/arith.lisp +++ b/src/compiler/sparc/arith.lisp @@ -44,12 +44,12 @@ (define-vop (fast-lognot/fixnum fixnum-unop) (:translate lognot) - (:generator 2 + (:generator 1 (inst xor res x (fixnumize -1)))) (define-vop (fast-lognot/signed signed-unop) (:translate lognot) - (:generator 1 + (:generator 2 (inst not res x))) ;;;; Binary fixnum operations. @@ -647,7 +647,7 @@ ;;;; Modular functions: -(define-modular-fun lognot-mod32 (x) lognot :unsigned 32) +(define-modular-fun lognot-mod32 (x) lognot :untagged nil 32) (define-vop (lognot-mod32/unsigned=>unsigned) (:translate lognot-mod32) (:args (x :scs (unsigned-reg))) @@ -666,7 +666,7 @@ (vop (symbolicate 'fast- fun '/unsigned=>unsigned)) (cvop (symbolicate 'fast- fun '-c/unsigned=>unsigned))) `(progn - (define-modular-fun ,mfun-name (x y) ,fun :unsigned 32) + (define-modular-fun ,mfun-name (x y) ,fun :untagged nil 32) (define-vop (,modvop ,vop) (:translate ,mfun-name)) ,@(when constantp @@ -674,7 +674,6 @@ (:translate ,mfun-name)))))))) (define-modular-backend + t) (define-modular-backend - t) - (define-modular-backend logxor t) (define-modular-backend logeqv t) (define-modular-backend logandc1) (define-modular-backend logandc2 t) @@ -781,7 +780,7 @@ ;;; (define-vop (fast-eql/fixnum fast-conditional) - (:args (x :scs (any-reg descriptor-reg zero)) + (:args (x :scs (any-reg zero)) (y :scs (any-reg zero))) (:arg-types tagged-num tagged-num) (:note "inline fixnum comparison") @@ -792,11 +791,13 @@ (inst nop))) ;;; (define-vop (generic-eql/fixnum fast-eql/fixnum) + (:args (x :scs (any-reg descriptor-reg)) + (y :scs (any-reg))) (:arg-types * tagged-num) (:variant-cost 7)) (define-vop (fast-eql-c/fixnum fast-conditional/fixnum) - (:args (x :scs (any-reg descriptor-reg zero))) + (:args (x :scs (any-reg zero))) (:arg-types tagged-num (:constant (signed-byte 11))) (:info target not-p y) (:translate eql) @@ -806,32 +807,12 @@ (inst nop))) ;;; (define-vop (generic-eql-c/fixnum fast-eql-c/fixnum) + (:args (x :scs (any-reg descriptor-reg))) (:arg-types * (:constant (signed-byte 11))) (:variant-cost 6)) ;;;; 32-bit logical operations -(define-vop (merge-bits) - (:translate merge-bits) - (:args (shift :scs (signed-reg unsigned-reg)) - (prev :scs (unsigned-reg)) - (next :scs (unsigned-reg))) - (:arg-types tagged-num unsigned-num unsigned-num) - (:temporary (:scs (unsigned-reg) :to (:result 0)) temp) - (:temporary (:scs (unsigned-reg) :to (:result 0) :target result) res) - (:results (result :scs (unsigned-reg))) - (:result-types unsigned-num) - (:policy :fast-safe) - (:generator 4 - (let ((done (gen-label))) - (inst cmp shift) - (inst b :eq done) - (inst srl res next shift) - (inst sub temp zero-tn shift) - (inst sll temp prev temp) - (inst or res temp) - (emit-label done) - (move result res)))) (define-vop (shift-towards-someplace) (:policy :fast-safe) @@ -1062,7 +1043,7 @@ (inst sra digit fixnum n-fixnum-tag-bits))) (define-vop (bignum-floor) - (:translate sb!bignum:%floor) + (:translate sb!bignum:%bigfloor) (:policy :fast-safe) (:args (div-high :scs (unsigned-reg) :target rem) (div-low :scs (unsigned-reg) :target quo) @@ -1086,7 +1067,7 @@ (inst not quo))) (define-vop (bignum-floor-v8) - (:translate sb!bignum:%floor) + (:translate sb!bignum:%bigfloor) (:policy :fast-safe) (:args (div-high :scs (unsigned-reg) :target rem) (div-low :scs (unsigned-reg) :target quo) @@ -1115,7 +1096,7 @@ (move quo q)))) (define-vop (bignum-floor-v9) - (:translate sb!bignum:%floor) + (:translate sb!bignum:%bigfloor) (:policy :fast-safe) (:args (div-high :scs (unsigned-reg)) (div-low :scs (unsigned-reg))