X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fppc%2Farith.lisp;h=e5eabce34b69fd9d6c594b765dbfdbc42371aa06;hb=96aa790ea1d70810e862665c3c8be4ce405a964c;hp=f8cb9aa1b44dce12979bf203c4cd2f3cb26bc6af;hpb=7deecae2d959173eda6a153d490c752c32050a9e;p=sbcl.git diff --git a/src/compiler/ppc/arith.lisp b/src/compiler/ppc/arith.lisp index f8cb9aa..e5eabce 100644 --- a/src/compiler/ppc/arith.lisp +++ b/src/compiler/ppc/arith.lisp @@ -1154,6 +1154,34 @@ (inst mullw lo x y) (inst mulhwu hi x y))) +#!+multiply-high-vops +(define-vop (mulhi) + (:translate sb!kernel:%multiply-high) + (:policy :fast-safe) + (:args (x :scs (unsigned-reg)) + (y :scs (unsigned-reg))) + (:arg-types unsigned-num unsigned-num) + (:results (hi :scs (unsigned-reg))) + (:result-types unsigned-num) + (:generator 20 + (inst mulhwu hi x y))) + +#!+multiply-high-vops +(define-vop (mulhi/fx) + (:translate sb!kernel:%multiply-high) + (:policy :fast-safe) + (:args (x :scs (any-reg)) + (y :scs (unsigned-reg))) + (:arg-types positive-fixnum unsigned-num) + (:temporary (:sc non-descriptor-reg :from :eval :to :result) temp) + (:temporary (:sc non-descriptor-reg :from :eval :to :result) mask) + (:results (hi :scs (any-reg))) + (:result-types positive-fixnum) + (:generator 15 + (inst mulhwu temp x y) + (inst lr mask fixnum-tag-mask) + (inst andc hi temp mask))) + (define-vop (bignum-lognot lognot-mod32/unsigned=>unsigned) (:translate sb!bignum:%lognot)) @@ -1169,7 +1197,7 @@ (define-vop (bignum-floor) - (:translate sb!bignum:%floor) + (:translate sb!bignum:%bigfloor) (:policy :fast-safe) (:args (num-high :scs (unsigned-reg) :target rem) (num-low :scs (unsigned-reg) :target rem-low) @@ -1207,7 +1235,7 @@ #| (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)