X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fx86%2Fsystem.lisp;h=ddde0261be399b40aa1d37cb8eb716275b5e80a5;hb=953e2961a4e0f130d67da600d1c965d6794a8984;hp=fd14fbfac26c8f1c97c06c003291632b43503839;hpb=a7ec2f1af6881c93585d97fb2fdcdfd98006f217;p=sbcl.git diff --git a/src/compiler/x86/system.lisp b/src/compiler/x86/system.lisp index fd14fbf..ddde026 100644 --- a/src/compiler/x86/system.lisp +++ b/src/compiler/x86/system.lisp @@ -135,17 +135,6 @@ ;; fixnum. (inst and res (lognot lowtag-mask)) (inst shr res 1))) - -(define-vop (make-other-immediate-type) - (:args (val :scs (any-reg descriptor-reg) :target res) - (type :scs (unsigned-reg immediate))) - (:results (res :scs (any-reg descriptor-reg) :from (:argument 0))) - (:generator 2 - (move res val) - (inst shl res (- n-widetag-bits n-fixnum-tag-bits)) - (inst or res (sc-case type - (unsigned-reg type) - (immediate (tn-value type)))))) ;;;; allocation @@ -254,6 +243,13 @@ (:generator 1 (inst break pending-interrupt-trap))) +#!+sb-safepoint +(define-vop (insert-safepoint) + (:policy :fast-safe) + (:translate sb!kernel::gc-safepoint) + (:generator 0 + (emit-safepoint))) + #!+sb-thread (defknown current-thread-offset-sap ((unsigned-byte 32)) system-area-pointer (flushable)) @@ -263,10 +259,19 @@ (:results (sap :scs (sap-reg))) (:result-types system-area-pointer) (:translate current-thread-offset-sap) - (:args (n :scs (unsigned-reg) :target sap)) + (:args (n :scs (unsigned-reg) + #!+win32 #!+win32 :to :save + #!-win32 #!-win32 :target sap)) (:arg-types unsigned-num) (:policy :fast-safe) (:generator 2 + #!+win32 + (progn + ;; Note that SAP conflicts with N in this case, hence the reader + ;; conditionals above. + (inst mov sap (make-ea :dword :disp +win32-tib-arbitrary-field-offset+) :fs) + (inst mov sap (make-ea :dword :base sap :disp 0 :index n :scale 4))) + #!-win32 (inst mov sap (make-ea :dword :disp 0 :index n :scale 4) :fs))) (define-vop (halt) @@ -385,3 +390,9 @@ number of CPU cycles elapsed as secondary value. EXPERIMENTAL." (:policy :fast-safe) (:translate %data-dependency-barrier) (:generator 3)) + +(define-vop (pause) + (:translate spin-loop-hint) + (:policy :fast-safe) + (:generator 0 + (inst pause)))