X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fppc%2Fcell.lisp;h=d44dc85971c337d432afb0cce70aa8df20f50e91;hb=0e03a9ac950b78d776c4869c809e202d9e929f39;hp=ff164784a7705c910cfdfe2427933300dadf0d57;hpb=52cfe54802db8736f1f4e2b67764c43bba9b78b3;p=sbcl.git diff --git a/src/compiler/ppc/cell.lisp b/src/compiler/ppc/cell.lisp index ff16478..d44dc85 100644 --- a/src/compiler/ppc/cell.lisp +++ b/src/compiler/ppc/cell.lisp @@ -91,7 +91,7 @@ ;; it is a fixnum. The lowtag selection magic that is required to ;; ensure this is explained in the comment in objdef.lisp (loadw res symbol symbol-hash-slot other-pointer-lowtag) - (inst clrrwi res res (1- n-lowtag-bits)))) + (inst clrrwi res res n-fixnum-tag-bits))) ;;;; Fdefinition (fdefn) objects. @@ -172,6 +172,7 @@ (loadw value bsp-tn (- binding-value-slot binding-size)) (storew value symbol symbol-value-slot other-pointer-lowtag) (storew zero-tn bsp-tn (- binding-symbol-slot binding-size)) + (storew zero-tn bsp-tn (- binding-value-slot binding-size)) (inst subi bsp-tn bsp-tn (* 2 n-word-bytes)))) @@ -196,6 +197,7 @@ (storew zero-tn bsp-tn (- binding-symbol-slot binding-size)) (emit-label skip) + (storew zero-tn bsp-tn (- binding-value-slot binding-size)) (inst subi bsp-tn bsp-tn (* 2 n-word-bytes)) (inst cmpw where bsp-tn) (inst bne loop) @@ -218,10 +220,6 @@ (:variant funcallable-instance-info-offset fun-pointer-lowtag) (:translate %set-funcallable-instance-info)) -(define-vop (funcallable-instance-lexenv cell-ref) - (:variant funcallable-instance-lexenv-slot fun-pointer-lowtag)) - - (define-vop (closure-ref slot-ref) (:variant closure-info-offset fun-pointer-lowtag)) @@ -252,19 +250,6 @@ (loadw temp struct 0 instance-pointer-lowtag) (inst srwi res temp n-widetag-bits))) -(define-vop (instance-ref slot-ref) - (:variant instance-slots-offset instance-pointer-lowtag) - (:policy :fast-safe) - (:translate %instance-ref) - (:arg-types * (:constant index))) - -#+nil -(define-vop (instance-set slot-set) - (:policy :fast-safe) - (:translate %instance-set) - (:variant instance-slots-offset instance-pointer-lowtag) - (:arg-types instance (:constant index) *)) - (define-vop (instance-index-ref word-index-ref) (:policy :fast-safe) (:translate %instance-ref) @@ -307,8 +292,8 @@ (:result-types unsigned-num) (:generator 5 (loadw offset object 0 instance-pointer-lowtag) - (inst srwi offset offset n-widetag-bits) - (inst slwi offset offset 2) + ;; offset = (offset >> n-widetag-bits) << 2 + (inst rlwinm offset offset (- 32 (- n-widetag-bits 2)) (- n-widetag-bits 2) 29) (inst subf offset index offset) (inst addi offset @@ -329,8 +314,8 @@ (:result-types unsigned-num) (:generator 5 (loadw offset object 0 instance-pointer-lowtag) - (inst srwi offset offset n-widetag-bits) - (inst slwi offset offset 2) + ;; offset = (offset >> n-widetag-bits) << 2 + (inst rlwinm offset offset (- 32 (- n-widetag-bits 2)) (- n-widetag-bits 2) 29) (inst subf offset index offset) (inst addi offset @@ -351,8 +336,8 @@ (:result-types single-float) (:generator 5 (loadw offset object 0 instance-pointer-lowtag) - (inst srwi offset offset n-widetag-bits) - (inst slwi offset offset 2) + ;; offset = (offset >> n-widetag-bits) << 2 + (inst rlwinm offset offset (- 32 (- n-widetag-bits 2)) (- n-widetag-bits 2) 29) (inst subf offset index offset) (inst addi offset @@ -373,8 +358,8 @@ (:temporary (:scs (non-descriptor-reg)) offset) (:generator 5 (loadw offset object 0 instance-pointer-lowtag) - (inst srwi offset offset n-widetag-bits) - (inst slwi offset offset 2) + ;; offset = (offset >> n-widetag-bits) << 2 + (inst rlwinm offset offset (- 32 (- n-widetag-bits 2)) (- n-widetag-bits 2) 29) (inst subf offset index offset) (inst addi offset @@ -396,8 +381,8 @@ (:result-types double-float) (:generator 5 (loadw offset object 0 instance-pointer-lowtag) - (inst srwi offset offset n-widetag-bits) - (inst slwi offset offset 2) + ;; offset = (offset >> n-widetag-bits) << 2 + (inst rlwinm offset offset (- 32 (- n-widetag-bits 2)) (- n-widetag-bits 2) 29) (inst subf offset index offset) (inst addi offset @@ -418,8 +403,8 @@ (:temporary (:scs (non-descriptor-reg)) offset) (:generator 5 (loadw offset object 0 instance-pointer-lowtag) - (inst srwi offset offset n-widetag-bits) - (inst slwi offset offset 2) + ;; offset = (offset >> n-widetag-bits) << 2 + (inst rlwinm offset offset (- 32 (- n-widetag-bits 2)) (- n-widetag-bits 2) 29) (inst subf offset index offset) (inst addi offset @@ -441,8 +426,8 @@ (:result-types complex-single-float) (:generator 5 (loadw offset object 0 instance-pointer-lowtag) - (inst srwi offset offset n-widetag-bits) - (inst slwi offset offset 2) + ;; offset = (offset >> n-widetag-bits) << 2 + (inst rlwinm offset offset (- 32 (- n-widetag-bits 2)) (- n-widetag-bits 2) 29) (inst subf offset index offset) (inst addi offset @@ -465,8 +450,8 @@ (:temporary (:scs (non-descriptor-reg)) offset) (:generator 5 (loadw offset object 0 instance-pointer-lowtag) - (inst srwi offset offset n-widetag-bits) - (inst slwi offset offset 2) + ;; offset = (offset >> n-widetag-bits) << 2 + (inst rlwinm offset offset (- 32 (- n-widetag-bits 2)) (- n-widetag-bits 2) 29) (inst subf offset index offset) (inst addi offset @@ -496,8 +481,8 @@ (:result-types complex-double-float) (:generator 5 (loadw offset object 0 instance-pointer-lowtag) - (inst srwi offset offset n-widetag-bits) - (inst slwi offset offset 2) + ;; offset = (offset >> n-widetag-bits) << 2 + (inst rlwinm offset offset (- 32 (- n-widetag-bits 2)) (- n-widetag-bits 2) 29) (inst subf offset index offset) (inst addi offset @@ -520,8 +505,8 @@ (:temporary (:scs (non-descriptor-reg)) offset) (:generator 5 (loadw offset object 0 instance-pointer-lowtag) - (inst srwi offset offset n-widetag-bits) - (inst slwi offset offset 2) + ;; offset = (offset >> n-widetag-bits) << 2 + (inst rlwinm offset offset (- 32 (- n-widetag-bits 2)) (- n-widetag-bits 2) 29) (inst subf offset index offset) (inst addi offset