X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fx86%2Fcell.lisp;h=c3cfb86ab9de748449ebfa175f9f372e2a4ad410;hb=7f008dde7e2c89187a963444e09a8bc594bd9f91;hp=89da9fc0195e74c7f04f6aa9bf3e2fd04f77592e;hpb=50305b602c3953440af716137a56f50cd204375d;p=sbcl.git diff --git a/src/compiler/x86/cell.lisp b/src/compiler/x86/cell.lisp index 89da9fc..c3cfb86 100644 --- a/src/compiler/x86/cell.lisp +++ b/src/compiler/x86/cell.lisp @@ -116,13 +116,8 @@ (:generator 2 ;; The symbol-hash slot of NIL holds NIL because it is also the ;; cdr slot, so we have to strip off the two low bits to make sure - ;; it is a fixnum. - ;; - ;; FIXME: Is this still true? It seems to me from my reading of - ;; the DEFINE-PRIMITIVE-OBJECT in objdef.lisp that the symbol-hash - ;; is the second slot, and offset 0 = tags and stuff (and CAR slot in - ;; a CONS), offset 1 = value slot (and CDR slot in a CONS), and - ;; offset 2 = hash slot. + ;; 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 and res (lognot #b11)))) @@ -139,10 +134,7 @@ (:generator 10 (loadw value object fdefn-fun-slot other-pointer-lowtag) (inst cmp value nil-value) - ;; FIXME: UNDEFINED-SYMBOL-ERROR seems to actually be for symbols with no - ;; function value, not, as the name might suggest, symbols with no ordinary - ;; value. Perhaps the name could be made more mnemonic? - (let ((err-lab (generate-error-code vop undefined-symbol-error object))) + (let ((err-lab (generate-error-code vop undefined-fun-error object))) (inst jmp :e err-lab)))) (define-vop (set-fdefn-fun) @@ -292,43 +284,6 @@ (define-full-setter instance-index-set * instance-slots-offset instance-pointer-lowtag (any-reg descriptor-reg) * %instance-set) - -(defknown sb!kernel::%instance-set-conditional (instance index t t) t - (unsafe)) - -(define-vop (instance-set-conditional-c slot-set-conditional) - (:policy :fast-safe) - (:translate sb!kernel::%instance-set-conditional) - (:variant instance-slots-offset instance-pointer-lowtag) - (:arg-types instance (:constant index) * *)) - -(define-vop (instance-set-conditional) - (:translate sb!kernel::%instance-set-conditional) - (:args (object :scs (descriptor-reg) :to :eval) - (slot :scs (any-reg) :to :result) - (old-value :scs (descriptor-reg any-reg) :target eax) - (new-value :scs (descriptor-reg any-reg) :target temp)) - (:arg-types instance positive-fixnum * *) - (:temporary (:sc descriptor-reg :offset eax-offset - :from (:argument 1) :to :result :target result) eax) - (:temporary (:sc descriptor-reg :from (:argument 2) :to :result) temp) - (:results (result :scs (descriptor-reg))) - (:policy :fast-safe) - (:generator 5 - (move eax old-value) - (move temp new-value) - (inst cmpxchg (make-ea :dword :base object :index slot :scale 1 - :disp (- (* instance-slots-offset n-word-bytes) - instance-pointer-lowtag)) - temp) - (move result eax))) - -(defknown %instance-xadd (instance index fixnum) fixnum ()) -(define-vop (instance-xadd-c slot-xadd) - (:policy :fast-safe) - (:translate %instance-xadd) - (:variant instance-slots-offset instance-pointer-lowtag) - (:arg-types instance (:constant index) tagged-num)) ;;;; code object frobbing