X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fppc%2Fcell.lisp;h=c3a3fbd3013e5dddc91afa49b71a2b01e3dad2be;hb=49e8403800426f37a54d9b87353a31af36e7af40;hp=ff164784a7705c910cfdfe2427933300dadf0d57;hpb=52cfe54802db8736f1f4e2b67764c43bba9b78b3;p=sbcl.git diff --git a/src/compiler/ppc/cell.lisp b/src/compiler/ppc/cell.lisp index ff16478..c3a3fbd 100644 --- a/src/compiler/ppc/cell.lisp +++ b/src/compiler/ppc/cell.lisp @@ -54,7 +54,7 @@ (:generator 9 (move obj-temp object) (loadw value obj-temp symbol-value-slot other-pointer-lowtag) - (let ((err-lab (generate-error-code vop unbound-symbol-error obj-temp))) + (let ((err-lab (generate-error-code vop 'unbound-symbol-error obj-temp))) (inst cmpwi value unbound-marker-widetag) (inst beq err-lab)))) @@ -91,7 +91,14 @@ ;; 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))) + +;;; On unithreaded builds these are just copies of the non-global versions. +(define-vop (%set-symbol-global-value set)) +(define-vop (symbol-global-value symbol-value) + (:translate symbol-global-value)) +(define-vop (fast-symbol-global-value fast-symbol-value) + (:translate symbol-global-value)) ;;;; Fdefinition (fdefn) objects. @@ -108,7 +115,7 @@ (move obj-temp object) (loadw value obj-temp fdefn-fun-slot other-pointer-lowtag) (inst cmpw value null-tn) - (let ((err-lab (generate-error-code vop undefined-fun-error obj-temp))) + (let ((err-lab (generate-error-code vop 'undefined-fun-error obj-temp))) (inst beq err-lab)))) (define-vop (set-fdefn-fun) @@ -172,6 +179,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 +204,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 +227,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 +257,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 +299,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 +321,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 +343,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 +365,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 +388,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 +410,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 +433,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 +457,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 +488,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 +512,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