Restore win32 build.
authorStas Boukarev <stassats@gmail.com>
Wed, 25 Sep 2013 19:42:34 +0000 (23:42 +0400)
committerStas Boukarev <stassats@gmail.com>
Wed, 25 Sep 2013 19:35:26 +0000 (23:35 +0400)
The changes to special binding made binding space to contain
tls-indexes instead of symbols, but on windows WITH-TLS-EA macro
causes the tls-index to be an absolute address, storing which caused
problems when UNBIND performed its own address resolution.

Reported by Elliot Slaughter.

src/compiler/x86/cell.lisp

index 9483fee..8a93d7b 100644 (file)
 (define-vop (bind)
   (:args (val :scs (any-reg descriptor-reg))
          (symbol :scs (descriptor-reg)))
-  (:temporary (:sc unsigned-reg) tls-index bsp)
+  (:temporary (:sc unsigned-reg) tls-index bsp
+                                 #!+win32 temp)
   (:generator 10
      (load-binding-stack-pointer bsp)
      (loadw tls-index symbol symbol-tls-index-slot other-pointer-lowtag)
                    (#.esi-offset 'alloc-tls-index-in-esi))
                  :assembly-routine))
      TLS-INDEX-VALID
+     ;; with-tls-ea on win32 causes tls-index to be an absolute address
+     ;; which is problematic when UNBIND uses with-tls-ea too.
+     #!+win32(move temp tls-index)
      (with-tls-ea (EA :base tls-index :base-already-live-p t)
        (inst push EA :maybe-fs)
        (popw bsp (- binding-value-slot binding-size))
-       (storew tls-index bsp (- binding-symbol-slot binding-size))
+       (storew #!-win32 tls-index
+               #!+win32 temp
+               bsp (- binding-symbol-slot binding-size))
        (inst mov EA val :maybe-fs))))
 
 #!-sb-thread