1.0.4.82: more x86 backend cleanups
authorlisphacker <lisphacker>
Fri, 13 Apr 2007 20:40:12 +0000 (20:40 +0000)
committerlisphacker <lisphacker>
Fri, 13 Apr 2007 20:40:12 +0000 (20:40 +0000)
  * 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.

src/compiler/x86/c-call.lisp
src/compiler/x86/macros.lisp
version.lisp-expr

index ae4a9b6..b23a605 100644 (file)
@@ -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)
index 7e608ce..9d6ce4a 100644 (file)
@@ -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)
 (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
index 98d8c4e..806d71a 100644 (file)
@@ -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"