X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fx86%2Fcell.lisp;h=e30f508ef358f7dc20e0f0a485f9f11fceabe849;hb=9be48f2a73ca5f4cc0848b8c0adad7127de10373;hp=ca2eca9376ce06c8c4f51585a9a50bc87e1fce0e;hpb=26bbfd93d01cefc0bbf97727379bdbdace8bf609;p=sbcl.git diff --git a/src/compiler/x86/cell.lisp b/src/compiler/x86/cell.lisp index ca2eca9..e30f508 100644 --- a/src/compiler/x86/cell.lisp +++ b/src/compiler/x86/cell.lisp @@ -28,27 +28,7 @@ (:ignore name) (:results) (:generator 1 - (if (sc-is value immediate) - (let ((val (tn-value value))) - (etypecase val - (integer - (inst mov - (make-ea :dword :base object - :disp (- (* offset n-word-bytes) lowtag)) - (fixnumize val))) - (symbol - (inst mov - (make-ea :dword :base object - :disp (- (* offset n-word-bytes) lowtag)) - (+ nil-value (static-symbol-offset val)))) - (character - (inst mov - (make-ea :dword :base object - :disp (- (* offset n-word-bytes) lowtag)) - (logior (ash (char-code val) n-widetag-bits) - character-widetag))))) - ;; Else, value not immediate. - (storew value object offset lowtag)))) + (storew (encode-value-if-immediate value) object offset lowtag))) @@ -86,16 +66,6 @@ (define-vop (set cell-set) (:variant symbol-value-slot other-pointer-lowtag)) -;;; Do a cell ref with an error check for being unbound. -;;; XXX stil used? I can't see where -dan -(define-vop (checked-cell-ref) - (:args (object :scs (descriptor-reg) :target obj-temp)) - (:results (value :scs (descriptor-reg any-reg))) - (:policy :fast-safe) - (:vop-var vop) - (:save-p :compute-only) - (:temporary (:sc descriptor-reg :from (:argument 0)) obj-temp)) - ;;; With Symbol-Value, we check that the value isn't the trap object. So ;;; Symbol-Value of NIL is NIL. #!+sb-thread @@ -174,9 +144,8 @@ (:generator 4 (move result value) (inst lock) - (inst add (make-ea :dword :base object - :disp (- (* symbol-value-slot n-word-bytes) - other-pointer-lowtag)) + (inst add (make-ea-for-object-slot object symbol-value-slot + other-pointer-lowtag) value))) #!+sb-thread @@ -254,9 +223,8 @@ (:generator 38 (load-type type function (- fun-pointer-lowtag)) (inst lea raw - (make-ea :byte :base function - :disp (- (* simple-fun-code-offset n-word-bytes) - fun-pointer-lowtag))) + (make-ea-for-object-slot function simple-fun-code-offset + fun-pointer-lowtag)) (inst cmp type simple-fun-header-widetag) (inst jmp :e normal-fn) (inst lea raw (make-fixup "closure_tramp" :foreign))