From: lisphacker Date: Fri, 13 Apr 2007 20:40:12 +0000 (+0000) Subject: 1.0.4.82: more x86 backend cleanups X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=a83d979b12102a512f8b040fa2f9329db5ecf28e;p=sbcl.git 1.0.4.82: more x86 backend cleanups * optimized callback code slightly (use load-symbol-value (one instruction) instead of two discrete instructions) * cleaned up pseudo-atomic by adding an optional width to make-ea-for-symbol-value. --- diff --git a/src/compiler/x86/c-call.lisp b/src/compiler/x86/c-call.lisp index ae4a9b6..b23a605 100644 --- a/src/compiler/x86/c-call.lisp +++ b/src/compiler/x86/c-call.lisp @@ -400,9 +400,7 @@ pointer to the arguments." ;; to ensure it'll work even if the GC moves ENTER-ALIEN-CALLBACK. ;; Skip any SB-THREAD TLS magic, since we don't expecte anyone ;; to rebind the variable. -- JES, 2006-01-01 - (inst mov eax (+ nil-value (static-symbol-offset - 'sb!alien::*enter-alien-callback*))) - (loadw eax eax symbol-value-slot other-pointer-lowtag) + (load-symbol-value eax sb!alien::*enter-alien-callback*) (inst push eax) ; function (inst mov eax (foreign-symbol-address "funcall3")) (inst call eax) diff --git a/src/compiler/x86/macros.lisp b/src/compiler/x86/macros.lisp index 7e608ce..9d6ce4a 100644 --- a/src/compiler/x86/macros.lisp +++ b/src/compiler/x86/macros.lisp @@ -79,9 +79,9 @@ (defmacro load-symbol (reg symbol) `(inst mov ,reg (+ nil-value (static-symbol-offset ,symbol)))) -(defmacro make-ea-for-symbol-value (symbol) +(defmacro make-ea-for-symbol-value (symbol &optional (width :dword)) (declare (type symbol symbol)) - `(make-ea :dword + `(make-ea ,width :disp (+ nil-value (static-symbol-offset ',symbol) (ash symbol-value-slot word-shift) @@ -376,21 +376,10 @@ (defmacro pseudo-atomic (&rest forms) (with-unique-names (label) `(let ((,label (gen-label))) - ;; FIXME: The MAKE-EA noise should become a MACROLET macro - ;; or something. (perhaps SVLB, for static variable low - ;; byte) - (inst or (make-ea :byte :disp (+ nil-value - (static-symbol-offset - '*pseudo-atomic-bits*) - (ash symbol-value-slot word-shift) - (- other-pointer-lowtag))) + (inst or (make-ea-for-symbol-value *pseudo-atomic-bits* :byte) (fixnumize 1)) ,@forms - (inst xor (make-ea :byte :disp (+ nil-value - (static-symbol-offset - '*pseudo-atomic-bits*) - (ash symbol-value-slot word-shift) - (- other-pointer-lowtag))) + (inst xor (make-ea-for-symbol-value *pseudo-atomic-bits* :byte) (fixnumize 1)) (inst jmp :z ,label) ;; if PAI was set, interrupts were disabled at the same diff --git a/version.lisp-expr b/version.lisp-expr index 98d8c4e..806d71a 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; 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".) -"1.0.4.81" +"1.0.4.82"