X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fx86-64%2Fsystem.lisp;h=083374fa86d0dd4062cb05ba1ac109aabd0449d5;hb=9c510b74eca61bbcc2014dc2b1d02049dff50508;hp=2d710d97ec68d1b62c9a6877f4d1069dfd509687;hpb=77ae1e21c9418325b78e639a37634213b7222789;p=sbcl.git diff --git a/src/compiler/x86-64/system.lisp b/src/compiler/x86-64/system.lisp index 2d710d9..083374f 100644 --- a/src/compiler/x86-64/system.lisp +++ b/src/compiler/x86-64/system.lisp @@ -28,49 +28,48 @@ (:translate widetag-of) (:policy :fast-safe) (:args (object :scs (descriptor-reg))) - (:temporary (:sc unsigned-reg :offset eax-offset :to (:result 0)) rax) + (:temporary (:sc unsigned-reg :offset rax-offset :target result + :to (:result 0)) rax) (:results (result :scs (unsigned-reg))) (:result-types positive-fixnum) (:generator 6 - (inst mov rax object) + (inst movzx rax (reg-in-size object :byte)) (inst and al-tn lowtag-mask) (inst cmp al-tn other-pointer-lowtag) (inst jmp :e OTHER-PTR) (inst cmp al-tn fun-pointer-lowtag) (inst jmp :e FUNCTION-PTR) - ;; Pick off structures and list pointers. - (inst test al-tn 1) - (inst jmp :ne DONE) - ;; Pick off fixnums. - (inst and al-tn fixnum-tag-mask) + (inst test al-tn fixnum-tag-mask) (inst jmp :e DONE) + ;; Pick off structures and list pointers. + (inst test al-tn 2) + (inst jmp :ne DONE) + ;; must be an other immediate - (inst mov rax object) + (inst movzx rax (reg-in-size object :byte)) (inst jmp DONE) FUNCTION-PTR - (load-type al-tn object (- fun-pointer-lowtag)) + (load-type rax object (- fun-pointer-lowtag)) (inst jmp DONE) OTHER-PTR - (load-type al-tn object (- other-pointer-lowtag)) + (load-type rax object (- other-pointer-lowtag)) DONE - (inst movzx result al-tn))) + (move result rax))) (define-vop (fun-subtype) (:translate fun-subtype) (:policy :fast-safe) (:args (function :scs (descriptor-reg))) - (:temporary (:sc byte-reg :from (:eval 0) :to (:eval 1)) temp) (:results (result :scs (unsigned-reg))) (:result-types positive-fixnum) (:generator 6 - (load-type temp function (- fun-pointer-lowtag)) - (inst movzx result temp))) + (load-type result function (- fun-pointer-lowtag)))) (define-vop (set-fun-subtype) (:translate (setf fun-subtype)) @@ -137,17 +136,6 @@ ;; fixnum. (inst and res (lognot lowtag-mask)) (inst shr res 1))) - -(define-vop (make-other-immediate-type) - (:args (val :scs (any-reg descriptor-reg) :target res) - (type :scs (unsigned-reg immediate))) - (:results (res :scs (any-reg descriptor-reg) :from (:argument 0))) - (:generator 2 - (move res val) - (inst shl res (- n-widetag-bits n-fixnum-tag-bits)) - (inst or res (sc-case type - (unsigned-reg type) - (immediate (tn-value type)))))) ;;;; allocation @@ -260,6 +248,13 @@ (:generator 1 (inst break pending-interrupt-trap))) +#!+sb-safepoint +(define-vop (insert-safepoint) + (:policy :fast-safe) + (:translate sb!kernel::gc-safepoint) + (:generator 0 + (emit-safepoint))) + #!+sb-thread (defknown current-thread-offset-sap ((unsigned-byte 64)) system-area-pointer (flushable))