(let ((tls-index-valid (gen-label))
(get-tls-index-lock (gen-label))
(release-tls-index-lock (gen-label)))
- (load-tl-symbol-value bsp *binding-stack-pointer*)
+ (load-binding-stack-pointer bsp)
(loadw tls-index symbol symbol-tls-index-slot other-pointer-lowtag)
(inst add bsp (* binding-size n-word-bytes))
- (store-tl-symbol-value bsp *binding-stack-pointer* temp)
+ (store-binding-stack-pointer bsp)
(inst or tls-index tls-index)
(inst jmp :ne tls-index-valid)
;; four temporaries?
(:temporary (:sc unsigned-reg) symbol value bsp tls-index)
(:generator 0
- (load-tl-symbol-value bsp *binding-stack-pointer*)
+ (load-binding-stack-pointer bsp)
(loadw symbol bsp (- binding-symbol-slot binding-size))
(loadw value bsp (- binding-value-slot binding-size))
(storew 0 bsp (- binding-symbol-slot binding-size))
(inst sub bsp (* binding-size n-word-bytes))
- ;; we're done with value, so we can use it as a temp here
- (store-tl-symbol-value bsp *binding-stack-pointer* value)))
+ (store-binding-stack-pointer bsp)))
#!-sb-thread
(define-vop (unbind)
(:args (where :scs (descriptor-reg any-reg)))
(:temporary (:sc unsigned-reg) symbol value bsp #!+sb-thread tls-index)
(:generator 0
- (load-tl-symbol-value bsp *binding-stack-pointer*)
+ (load-binding-stack-pointer bsp)
(inst cmp where bsp)
(inst jmp :e DONE)
(inst sub bsp (* binding-size n-word-bytes))
(inst cmp where bsp)
(inst jmp :ne LOOP)
- ;; we're done with value, so can use it as a temporary
- (store-tl-symbol-value bsp *binding-stack-pointer* value)
+ (store-binding-stack-pointer bsp)
DONE))
\f
(declare (ignore temp))
`(store-symbol-value ,reg ,symbol))
+(defmacro load-binding-stack-pointer (reg)
+ #!+sb-thread
+ `(inst mov ,reg (make-ea :qword :base thread-base-tn
+ :disp (* 8 thread-binding-stack-pointer-slot)))
+ #!-sb-thread
+ `(load-symbol-value ,reg *binding-stack-pointer*))
+
+(defmacro store-binding-stack-pointer (reg)
+ #!+sb-thread
+ `(inst mov (make-ea :qword :base thread-base-tn
+ :disp (* 8 thread-binding-stack-pointer-slot))
+ ,reg)
+ #!-sb-thread
+ `(store-symbol-value ,reg *binding-stack-pointer*))
+
(defmacro load-type (target source &optional (offset 0))
#!+sb-doc
"Loads the type bits of a pointer into target independent of
(define-vop (current-binding-pointer)
(:results (res :scs (any-reg descriptor-reg)))
(:generator 1
- (load-tl-symbol-value res *binding-stack-pointer*)))
+ (load-binding-stack-pointer res)))
\f
;;;; unwind block hackery
(:translate binding-stack-pointer-sap)
(:policy :fast-safe)
(:generator 1
- (load-tl-symbol-value int *binding-stack-pointer*)))
+ (load-binding-stack-pointer int)))
(defknown (setf binding-stack-pointer-sap)
(system-area-pointer) system-area-pointer ())
(:arg-types system-area-pointer)
(:results (int :scs (sap-reg)))
(:result-types system-area-pointer)
- #!+sb-thread (:temporary (:sc any-reg) temp)
(:translate (setf binding-stack-pointer-sap))
(:policy :fast-safe)
(:generator 1
- (store-tl-symbol-value new-value *binding-stack-pointer* temp)
+ (store-binding-stack-pointer new-value)
(move int new-value)))
(define-vop (control-stack-pointer-sap)
(let ((tls-index-valid (gen-label))
(get-tls-index-lock (gen-label))
(release-tls-index-lock (gen-label)))
- (load-tl-symbol-value bsp *binding-stack-pointer*)
+ (load-binding-stack-pointer bsp)
(loadw tls-index symbol symbol-tls-index-slot other-pointer-lowtag)
(inst add bsp (* binding-size n-word-bytes))
- (store-tl-symbol-value bsp *binding-stack-pointer* temp)
+ (store-binding-stack-pointer bsp)
(inst or tls-index tls-index)
(inst jmp :ne tls-index-valid)
;; four temporaries?
(:temporary (:sc unsigned-reg) symbol value bsp tls-index)
(:generator 0
- (load-tl-symbol-value bsp *binding-stack-pointer*)
+ (load-binding-stack-pointer bsp)
(loadw symbol bsp (- binding-symbol-slot binding-size))
(loadw value bsp (- binding-value-slot binding-size))
(storew 0 bsp (- binding-symbol-slot binding-size))
(inst sub bsp (* binding-size n-word-bytes))
- ;; we're done with value, so we can use it as a temp here
- (store-tl-symbol-value bsp *binding-stack-pointer* value)))
+ (store-binding-stack-pointer bsp)))
#!-sb-thread
(define-vop (unbind)
(:args (where :scs (descriptor-reg any-reg)))
(:temporary (:sc unsigned-reg) symbol value bsp #!+sb-thread tls-index)
(:generator 0
- (load-tl-symbol-value bsp *binding-stack-pointer*)
+ (load-binding-stack-pointer bsp)
(inst cmp where bsp)
(inst jmp :e done)
(inst sub bsp (* binding-size n-word-bytes))
(inst cmp where bsp)
(inst jmp :ne loop)
- ;; we're done with value, so can use it as a temporary
- (store-tl-symbol-value bsp *binding-stack-pointer* value)
+ (store-binding-stack-pointer bsp)
DONE))
\f
(declare (ignore temp))
`(store-symbol-value ,reg ,symbol))
+(defmacro load-binding-stack-pointer (reg)
+ #!+sb-thread
+ `(progn
+ (inst fs-segment-prefix)
+ (inst mov ,reg (make-ea :dword
+ :disp (* 4 thread-binding-stack-pointer-slot))))
+ #!-sb-thread
+ `(load-symbol-value ,reg *binding-stack-pointer*))
+
+(defmacro store-binding-stack-pointer (reg)
+ #!+sb-thread
+ `(progn
+ (inst fs-segment-prefix)
+ (inst mov (make-ea :dword
+ :disp (* 4 thread-binding-stack-pointer-slot))
+ ,reg))
+ #!-sb-thread
+ `(store-symbol-value ,reg *binding-stack-pointer*))
+
(defmacro load-type (target source &optional (offset 0))
#!+sb-doc
"Loads the type bits of a pointer into target independent of
(define-vop (current-binding-pointer)
(:results (res :scs (any-reg descriptor-reg)))
(:generator 1
- (load-tl-symbol-value res *binding-stack-pointer*)))
+ (load-binding-stack-pointer res)))
\f
;;;; unwind block hackery
(:translate binding-stack-pointer-sap)
(:policy :fast-safe)
(:generator 1
- (load-tl-symbol-value int *binding-stack-pointer*)))
+ (load-binding-stack-pointer int)))
(defknown (setf binding-stack-pointer-sap)
(system-area-pointer) system-area-pointer ())
(:arg-types system-area-pointer)
(:results (int :scs (sap-reg)))
(:result-types system-area-pointer)
- #!+sb-thread (:temporary (:sc any-reg) temp)
(:translate (setf binding-stack-pointer-sap))
(:policy :fast-safe)
(:generator 1
- (store-tl-symbol-value new-value *binding-stack-pointer* temp)
+ (store-binding-stack-pointer new-value)
(move int new-value)))
(define-vop (control-stack-pointer-sap)
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.9.6.43"
+"0.9.6.44"