Wasn't used anywhere; probably intended for bignum operations.
\f
;;;; 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 srl next shift res)
- (inst beq shift done)
- (inst subq zero-tn shift temp)
- (inst sll prev temp temp)
- (inst bis res temp res)
- (emit-label done)
- (move res result))))
-
(define-vop (shift-towards-someplace)
(:policy :fast-safe)
(:args (num :scs (unsigned-reg))
\f
;;;; 32-bit logical operations
-(defknown merge-bits ((unsigned-byte 5) sb!vm:word sb!vm:word)
- sb!vm:word
- (foldable flushable movable))
-
(defknown word-logical-not (sb!vm:word) sb!vm:word
(foldable flushable movable))
(:arg-types * (:constant (signed-byte 9)))
(:variant-cost 6))
-;;;; 32-bit logical operations
-
-(define-vop (merge-bits) ; not implemented, even used ?
- (: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)
- (:results (result :scs (unsigned-reg)))
- (:result-types unsigned-num)
- (:policy :fast-safe)
- (:ignore shift prev next)
- (:generator 4
- (inst li 0 result)
- (inst break 0)))
-
\f
;;;; modular functions
(define-modular-fun +-mod32 (x y) + :untagged nil 32)
\f
;;;; 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 beq shift done)
- (inst srl res next shift)
- (inst subu temp zero-tn shift)
- (inst sll temp prev temp)
- (inst or res res temp)
- (emit-label done)
- (move result res))))
-
(define-vop (shift-towards-someplace)
(:policy :fast-safe)
(:args (num :scs (unsigned-reg))
\f
;;;; 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 cmpwi shift 0)
- (inst beq done)
- (inst srw res next shift)
- (inst sub temp zero-tn shift)
- (inst slw temp prev temp)
- (inst or res res temp)
- (emit-label done)
- (move result res))))
-
(define-vop (shift-towards-someplace)
(:policy :fast-safe)
(:args (num :scs (unsigned-reg))
\f
;;;; 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)
\f
;;;; 32-bit logical operations
-(define-vop (merge-bits)
- (:translate merge-bits)
- (:args (shift :scs (signed-reg unsigned-reg) :target ecx)
- (prev :scs (unsigned-reg) :target result)
- (next :scs (unsigned-reg)))
- (:arg-types tagged-num unsigned-num unsigned-num)
- (:temporary (:sc signed-reg :offset ecx-offset :from (:argument 0)) ecx)
- (:results (result :scs (unsigned-reg) :from (:argument 1)))
- (:result-types unsigned-num)
- (:policy :fast-safe)
- (:generator 4
- (move ecx shift)
- (move result prev)
- (inst shrd result next :cl)))
-
;;; Only the lower 6 bits of the shift amount are significant.
(define-vop (shift-towards-someplace)
(:policy :fast-safe)
\f
;;;; 32-bit logical operations
-(define-vop (merge-bits)
- (:translate merge-bits)
- (:args (shift :scs (signed-reg unsigned-reg) :target ecx)
- (prev :scs (unsigned-reg) :target result)
- (next :scs (unsigned-reg)))
- (:arg-types tagged-num unsigned-num unsigned-num)
- (:temporary (:sc signed-reg :offset ecx-offset :from (:argument 0)) ecx)
- (:results (result :scs (unsigned-reg) :from (:argument 1)))
- (:result-types unsigned-num)
- (:policy :fast-safe)
- (:generator 4
- (move ecx shift)
- (move result prev)
- (inst shrd result next :cl)))
-
;;; Only the lower 5 bits of the shift amount are significant.
(define-vop (shift-towards-someplace)
(:policy :fast-safe)
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.28.4"
+"1.0.28.5"