1.0.25.39: thread start/stop fixes
[sbcl.git] / src / compiler / x86-64 / cell.lisp
index 501bb4d..e82cdd4 100644 (file)
   (:results (result :scs (descriptor-reg any-reg)))
   (:generator 5
      (move rax old)
-     #!+sb-thread
-     (inst lock)
      (inst cmpxchg (make-ea :qword :base object
                             :disp (- (* offset n-word-bytes) lowtag))
-           new)
+           new :lock)
      (move result rax)))
 \f
 ;;;; symbol hacking VOPs
               new)
         (inst cmp rax no-tls-value-marker-widetag)
         (inst jmp :ne check)
-        (move rax old)
-        (inst lock))
+        (move rax old))
       (inst cmpxchg (make-ea :qword :base symbol
                              :disp (- (* symbol-value-slot n-word-bytes)
                                       other-pointer-lowtag)
                              :scale 1)
-            new)
+            new :lock)
       (emit-label check)
       (move result rax)
       (inst cmp result unbound-marker-widetag)
   (:policy :fast-safe)
   (:generator 4
     (move result value)
-    (inst lock)
     (inst add (make-ea :qword :base object
                        :disp (- (* symbol-value-slot n-word-bytes)
                                 other-pointer-lowtag))
-          value)))
+          value :lock)))
 
 #!+sb-thread
 (define-vop (boundp)
   (:translate boundp)
   (:policy :fast-safe)
   (:args (object :scs (descriptor-reg)))
-  (:conditional)
-  (:info target not-p)
+  (:conditional :ne)
   (:temporary (:sc descriptor-reg #+nil(:from (:argument 0))) value)
   (:generator 9
     (let ((check-unbound-label (gen-label)))
       (inst jmp :ne check-unbound-label)
       (loadw value object symbol-value-slot other-pointer-lowtag)
       (emit-label check-unbound-label)
-      (inst cmp value unbound-marker-widetag)
-      (inst jmp (if not-p :e :ne) target))))
+      (inst cmp value unbound-marker-widetag))))
 
 #!-sb-thread
 (define-vop (boundp)
   (:translate boundp)
   (:policy :fast-safe)
   (:args (object :scs (descriptor-reg)))
-  (:conditional)
-  (:info target not-p)
+  (:conditional :ne)
   (:generator 9
     (inst cmp (make-ea-for-object-slot object symbol-value-slot
                                        other-pointer-lowtag)
-          unbound-marker-widetag)
-    (inst jmp (if not-p :e :ne) target)))
+          unbound-marker-widetag)))
 
 
 (define-vop (symbol-hash)
   (:generator 4
     (loadw tmp object 0 instance-pointer-lowtag)
     (inst shr tmp n-widetag-bits)
-    #!+sb-thread
-    (inst lock)
-    (inst xadd (make-ea-for-raw-slot object index tmp) diff)
+    (inst xadd (make-ea-for-raw-slot object index tmp) diff :lock)
     (move result diff)))
 
 (define-vop (raw-instance-ref/single)