X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Falpha%2Fsystem.lisp;h=5a9945acc82e53c4ec2578cf9a262df0cc30fe41;hb=08d05510b51708853ca998154d8096b21d85edab;hp=eb9aa9a50d16ffeb38c2de1f771ff49179772242;hpb=08307967c71c580058a503d46aa087cfefcf8c69;p=sbcl.git diff --git a/src/compiler/alpha/system.lisp b/src/compiler/alpha/system.lisp index eb9aa9a..5a9945a 100644 --- a/src/compiler/alpha/system.lisp +++ b/src/compiler/alpha/system.lisp @@ -41,7 +41,7 @@ (inst blbs object done) ;; Pick off fixnums. - (inst and object 3 result) + (inst and object fixnum-tag-mask result) (inst beq result done) ;; Must be an other immediate. @@ -54,7 +54,7 @@ OTHER-PTR (load-type result object (- other-pointer-lowtag)) - + DONE)) (define-vop (fun-subtype) @@ -70,7 +70,7 @@ (:translate (setf fun-subtype)) (:policy :fast-safe) (:args (type :scs (unsigned-reg) :target result) - (function :scs (descriptor-reg))) + (function :scs (descriptor-reg))) (:arg-types positive-fixnum *) (:temporary (:scs (non-descriptor-reg)) temp) (:results (result :scs (unsigned-reg))) @@ -107,7 +107,7 @@ (:translate set-header-data) (:policy :fast-safe) (:args (x :scs (descriptor-reg) :target res) - (data :scs (any-reg immediate zero))) + (data :scs (any-reg immediate zero))) (:arg-types * positive-fixnum) (:results (res :scs (descriptor-reg))) (:temporary (:scs (non-descriptor-reg)) t1 t2) @@ -120,29 +120,30 @@ (inst bis t1 t2 t1)) (immediate (let ((c (ash (tn-value data) n-widetag-bits))) - (cond ((<= 0 c (1- (ash 1 8))) - (inst bis t1 c t1)) - (t - (inst li c t2) - (inst bis t1 t2 t1))))) + (cond ((<= 0 c (1- (ash 1 8))) + (inst bis t1 c t1)) + (t + (inst li c t2) + (inst bis t1 t2 t1))))) (zero)) (storew t1 x 0 other-pointer-lowtag) (move x res))) -(define-vop (make-fixnum) +(define-vop (pointer-hash) + (:translate pointer-hash) (:args (ptr :scs (any-reg descriptor-reg))) (:results (res :scs (any-reg descriptor-reg))) + (:policy :fast-safe) (:generator 1 - ;; - ;; Some code (the hash table code) depends on this returning a - ;; positive number so make sure it does. + ;; FIXME: It would be better if this would mask the lowtag, + ;; and shift the result into a positive fixnum like on x86. (inst sll ptr 35 res) (inst srl res 33 res))) (define-vop (make-other-immediate-type) (:args (val :scs (any-reg descriptor-reg)) - (type :scs (any-reg descriptor-reg immediate) - :target temp)) + (type :scs (any-reg descriptor-reg immediate) + :target temp)) (:results (res :scs (any-reg descriptor-reg))) (:temporary (:scs (non-descriptor-reg)) temp) (:generator 2 @@ -151,8 +152,8 @@ (inst sll val n-widetag-bits temp) (inst bis temp (tn-value type) res)) (t - (inst sra type 2 temp) - (inst sll val (- n-widetag-bits 2) res) + (inst sra type n-fixnum-tag-bits temp) + (inst sll val (- n-widetag-bits n-fixnum-tag-bits) res) (inst bis res temp res))))) @@ -201,7 +202,7 @@ (define-vop (compute-fun) (:args (code :scs (descriptor-reg)) - (offset :scs (signed-reg unsigned-reg))) + (offset :scs (signed-reg unsigned-reg))) (:arg-types * positive-fixnum) (:results (func :scs (descriptor-reg))) (:temporary (:scs (non-descriptor-reg)) ndescr) @@ -226,6 +227,10 @@ (define-vop (halt) (:generator 1 (inst gentrap halt-trap))) + +(define-vop (istream-memory-barrier) + (:generator 1 + (inst imb))) ;;;; dynamic vop count collection support @@ -235,8 +240,8 @@ (:temporary (:scs (non-descriptor-reg)) count) (:generator 1 (let ((offset - (- (* (+ index vector-data-offset) n-word-bytes) - other-pointer-lowtag))) + (- (* (+ index vector-data-offset) n-word-bytes) + other-pointer-lowtag))) (inst ldl count offset count-vector) (inst addq count 1 count) (inst stl count offset count-vector))))