X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fx86-64%2Fmacros.lisp;h=801c905da76b1ec4ee29b82014f9c5dc01806e56;hb=a3caf3155958590af9614705770358c0c8bdd8a8;hp=b7b0aa92b44c8ecce8774b179407b9ecdf245b24;hpb=48fb9976298ca77d4a7e4ec4d8427f041d2bf327;p=sbcl.git diff --git a/src/compiler/x86-64/macros.lisp b/src/compiler/x86-64/macros.lisp index b7b0aa9..801c905 100644 --- a/src/compiler/x86-64/macros.lisp +++ b/src/compiler/x86-64/macros.lisp @@ -99,14 +99,14 @@ (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))) + :disp (* n-word-bytes 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)) + :disp (* n-word-bytes thread-binding-stack-pointer-slot)) ,reg) #!-sb-thread `(store-symbol-value ,reg *binding-stack-pointer*)) @@ -294,7 +294,7 @@ #!+sb-thread (defmacro %clear-pseudo-atomic () '(inst mov (make-ea :qword :base thread-base-tn - :disp (* 8 thread-pseudo-atomic-bits-slot)) + :disp (* n-word-bytes thread-pseudo-atomic-bits-slot)) 0)) #!+sb-thread @@ -303,12 +303,12 @@ `(let ((,label (gen-label))) (inst mov (make-ea :qword :base thread-base-tn - :disp (* 8 thread-pseudo-atomic-bits-slot)) + :disp (* n-word-bytes thread-pseudo-atomic-bits-slot)) rbp-tn) ,@forms (inst xor (make-ea :qword :base thread-base-tn - :disp (* 8 thread-pseudo-atomic-bits-slot)) + :disp (* n-word-bytes thread-pseudo-atomic-bits-slot)) rbp-tn) (inst jmp :z ,label) ;; if PAI was set, interrupts were disabled at the same time @@ -362,6 +362,7 @@ (:generator 5 (move rax old-value) (inst cmpxchg (make-ea :qword :base object :index index + :scale (ash 1 (- word-shift n-fixnum-tag-bits)) :disp (- (* ,offset n-word-bytes) ,lowtag)) new-value :lock) (move value rax))))) @@ -379,6 +380,7 @@ (:result-types ,el-type) (:generator 3 ; pw was 5 (inst mov value (make-ea :qword :base object :index index + :scale (ash 1 (- word-shift n-fixnum-tag-bits)) :disp (- (* ,offset n-word-bytes) ,lowtag))))) (define-vop (,(symbolicate name "-C")) @@ -413,6 +415,7 @@ (:result-types ,el-type) (:generator 3 ; pw was 5 (inst mov value (make-ea :qword :base object :index index + :scale (ash 1 (- word-shift n-fixnum-tag-bits)) :disp (- (* (+ ,offset offset) n-word-bytes) ,lowtag))))) (define-vop (,(symbolicate name "-C")) @@ -447,6 +450,7 @@ (:result-types ,el-type) (:generator 4 ; was 5 (inst mov (make-ea :qword :base object :index index + :scale (ash 1 (- word-shift n-fixnum-tag-bits)) :disp (- (* ,offset n-word-bytes) ,lowtag)) value) (move result value))) @@ -489,6 +493,7 @@ (:result-types ,el-type) (:generator 4 ; was 5 (inst mov (make-ea :qword :base object :index index + :scale (ash 1 (- word-shift n-fixnum-tag-bits)) :disp (- (* (+ ,offset offset) n-word-bytes) ,lowtag)) value) (move result value))) @@ -524,7 +529,7 @@ Useful for e.g. foreign calls where another thread may trigger collection." (if objects (let ((pins (make-gensym-list (length objects))) - (wpo (block-gensym "WPO"))) + (wpo (gensym "WITH-PINNED-OBJECTS-THUNK"))) ;; BODY is stuffed in a function to preserve the lexical ;; environment. `(flet ((,wpo () (progn ,@body)))