X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fassembly%2Fx86%2Falloc.lisp;h=3131e454bf523bec6966b2fdec0b7e53967408bb;hb=6c296da561efd25c22e051a1e55080d9689f3ecc;hp=ef7a0261d59b102fbe3a07b3d8c5e7925648b193;hpb=55f790051c0ebd727777da5f8b6541d87dd49b38;p=sbcl.git diff --git a/src/assembly/x86/alloc.lisp b/src/assembly/x86/alloc.lisp index ef7a026..3131e45 100644 --- a/src/assembly/x86/alloc.lisp +++ b/src/assembly/x86/alloc.lisp @@ -111,19 +111,19 @@ ;; Now with the lock held, see if the symbol's tls index has been ;; set in the meantime. (loadw target other symbol-tls-index-slot other-pointer-lowtag) - (inst or target target) + (inst test target target) (inst jmp :ne release-tls-index-lock) ;; Allocate a new tls-index. (load-symbol-value target *free-tls-index*) (let ((not-error (gen-label)) (error (generate-error-code nil 'tls-exhausted-error))) - (inst cmp target (fixnumize tls-size)) + (inst cmp target (ash tls-size word-shift)) (inst jmp :l not-error) (%clear-pseudo-atomic) (inst jmp error) (emit-label not-error)) (inst add (make-ea-for-symbol-value *free-tls-index*) - (fixnumize 1)) + n-word-bytes) (storew target other symbol-tls-index-slot other-pointer-lowtag) (emit-label release-tls-index-lock) ;; No need for barriers on x86/x86-64 on unlock.