Factor out most x86 code using the FS prefix into a macro WITH-TLS-EA.
[sbcl.git] / src / compiler / x86 / call.lisp
index 72936a3..d9fdc1a 100644 (file)
   ;; register on -SB-THREAD.
   #!+sb-thread
   (progn
-    (inst cmp (make-ea :dword
-                       :disp (* thread-stepping-slot n-word-bytes))
-          nil-value :fs))
+    (with-tls-ea (EA :base :unused
+                     :disp-type :constant
+                     :disp (* thread-stepping-slot n-word-bytes))
+      (inst cmp EA nil-value :maybe-fs)))
   #!-sb-thread
   (inst cmp (make-ea-for-symbol-value sb!impl::*stepping*)
         nil-value))