Diff of /src/compiler/x86/c-call.lisp [0ace89] .. [5d4902] Maximize Restore

  Switch to side-by-side view

--- a/src/compiler/x86/c-call.lisp
+++ b/src/compiler/x86/c-call.lisp
@@ -209,27 +209,33 @@
 
 (define-vop (alloc-alien-stack-space)
   (:info amount)
+  (:temporary (:sc unsigned-reg) temp)
   (:results (result :scs (sap-reg any-reg)))
   (:generator 0
     (aver (not (location= result esp-tn)))
     (unless (zerop amount)
       (let ((delta (logandc2 (+ amount 3) 3)))
-	(inst sub (make-ea :dword
+	(inst mov temp
+	      (make-ea :dword
 			   :disp (+ nil-value
 				    (static-symbol-offset '*alien-stack*)
-				    (ash symbol-value-slot word-shift)
-				    (- other-pointer-lowtag)))
-	      delta)))
-    (load-symbol-value result *alien-stack*)))
+				(ash symbol-tls-index-slot word-shift)
+				(- other-pointer-lowtag))))
+	(inst gs-segment-prefix)
+	(inst sub (make-ea :dword :scale 1 :index temp) delta)))
+    (load-tl-symbol-value result *alien-stack*)))
 
 (define-vop (dealloc-alien-stack-space)
   (:info amount)
-  (:generator 0
-    (unless (zerop amount)
-      (let ((delta (logandc2 (+ amount 3) 3)))
-	(inst add (make-ea :dword
+  (:temporary (:sc unsigned-reg) temp)
+  (:generator 0
+    (unless (zerop amount)
+      (let ((delta (logandc2 (+ amount 3) 3)))
+	(inst mov temp
+	      (make-ea :dword
 			   :disp (+ nil-value
 				    (static-symbol-offset '*alien-stack*)
-				    (ash symbol-value-slot word-shift)
-				    (- other-pointer-lowtag)))
-	      delta)))))
+				(ash symbol-tls-index-slot word-shift)
+				(- other-pointer-lowtag))))
+	(inst gs-segment-prefix)
+	(inst add (make-ea :dword :scale 1 :index temp) delta)))))