From: lisphacker Date: Sat, 14 Apr 2007 15:36:19 +0000 (+0000) Subject: 1.0.4.88: x86 assembly-routine cleanups X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=24f9ba4a3f83da2f47f910668adcd9d3c43d716d;p=sbcl.git 1.0.4.88: x86 assembly-routine cleanups * More uses of make-ea-for-vector-data. * More uses of make-ea-for-object-slot. --- diff --git a/src/assembly/x86/arith.lisp b/src/assembly/x86/arith.lisp index 46aa23c..33c0439 100644 --- a/src/assembly/x86/arith.lisp +++ b/src/assembly/x86/arith.lisp @@ -319,14 +319,8 @@ ;; Generate a new set of results. (inst xor k k) LOOP1 - (inst mov y (make-ea :dword :base state :index k :scale 4 - :disp (- (* (+ 3 vector-data-offset) - n-word-bytes) - other-pointer-lowtag))) - (inst mov tmp (make-ea :dword :base state :index k :scale 4 - :disp (- (* (+ 1 3 vector-data-offset) - n-word-bytes) - other-pointer-lowtag))) + (inst mov y (make-ea-for-vector-data state :index k :offset 3)) + (inst mov tmp (make-ea-for-vector-data state :index k :offset (+ 1 3))) (inst and y #x80000000) (inst and tmp #x7fffffff) (inst or y tmp) @@ -334,27 +328,14 @@ (inst jmp :nc skip1) (inst xor y #x9908b0df) SKIP1 - (inst xor y (make-ea :dword :base state :index k :scale 4 - :disp (- (* (+ 397 3 vector-data-offset) - n-word-bytes) - other-pointer-lowtag))) - (inst mov (make-ea :dword :base state :index k :scale 4 - :disp (- (* (+ 3 vector-data-offset) - n-word-bytes) - other-pointer-lowtag)) - y) + (inst xor y (make-ea-for-vector-data state :index k :offset (+ 397 3))) + (inst mov (make-ea-for-vector-data state :index k :offset 3) y) (inst inc k) (inst cmp k (- 624 397)) (inst jmp :b loop1) LOOP2 - (inst mov y (make-ea :dword :base state :index k :scale 4 - :disp (- (* (+ 3 vector-data-offset) - n-word-bytes) - other-pointer-lowtag))) - (inst mov tmp (make-ea :dword :base state :index k :scale 4 - :disp (- (* (+ 1 3 vector-data-offset) - n-word-bytes) - other-pointer-lowtag))) + (inst mov y (make-ea-for-vector-data state :index k :offset 3)) + (inst mov tmp (make-ea-for-vector-data state :index k :offset (+ 1 3))) (inst and y #x80000000) (inst and tmp #x7fffffff) (inst or y tmp) @@ -362,27 +343,14 @@ (inst jmp :nc skip2) (inst xor y #x9908b0df) SKIP2 - (inst xor y (make-ea :dword :base state :index k :scale 4 - :disp (- (* (+ (- 397 624) 3 vector-data-offset) - n-word-bytes) - other-pointer-lowtag))) - (inst mov (make-ea :dword :base state :index k :scale 4 - :disp (- (* (+ 3 vector-data-offset) - n-word-bytes) - other-pointer-lowtag)) - y) + (inst xor y (make-ea-for-vector-data state :index k :offset (+ (- 397 624) 3))) + (inst mov (make-ea-for-vector-data state :index k :offset 3) y) (inst inc k) (inst cmp k (- 624 1)) (inst jmp :b loop2) - (inst mov y (make-ea :dword :base state - :disp (- (* (+ (- 624 1) 3 vector-data-offset) - n-word-bytes) - other-pointer-lowtag))) - (inst mov tmp (make-ea :dword :base state - :disp (- (* (+ 0 3 vector-data-offset) - n-word-bytes) - other-pointer-lowtag))) + (inst mov y (make-ea-for-vector-data state :offset (+ (- 624 1) 3))) + (inst mov tmp (make-ea-for-vector-data state :offset (+ 0 3))) (inst and y #x80000000) (inst and tmp #x7fffffff) (inst or y tmp) @@ -390,15 +358,8 @@ (inst jmp :nc skip3) (inst xor y #x9908b0df) SKIP3 - (inst xor y (make-ea :dword :base state - :disp (- (* (+ (- 397 1) 3 vector-data-offset) - n-word-bytes) - other-pointer-lowtag))) - (inst mov (make-ea :dword :base state - :disp (- (* (+ (- 624 1) 3 vector-data-offset) - n-word-bytes) - other-pointer-lowtag)) - y) + (inst xor y (make-ea-for-vector-data state :offset (+ (- 397 1) 3))) + (inst mov (make-ea-for-vector-data state :offset (+ (- 624 1) 3)) y) ;; Restore the temporary registers and return. (inst pop tmp) diff --git a/src/assembly/x86/assem-rtns.lisp b/src/assembly/x86/assem-rtns.lisp index 612e415..9465ceb 100644 --- a/src/assembly/x86/assem-rtns.lisp +++ b/src/assembly/x86/assem-rtns.lisp @@ -175,10 +175,7 @@ (inst push ebx) ;; And jump into the function. - (inst jmp - (make-ea :byte :base eax - :disp (- (* closure-fun-slot n-word-bytes) - fun-pointer-lowtag))) + (inst jmp (make-ea-for-object-slot eax closure-fun-slot fun-pointer-lowtag)) ;; All the arguments fit in registers, so load them. REGISTER-ARGS @@ -194,9 +191,7 @@ (pushw ebp-tn -2) ;; And away we go. - (inst jmp (make-ea :byte :base eax - :disp (- (* closure-fun-slot n-word-bytes) - fun-pointer-lowtag)))) + (inst jmp (make-ea-for-object-slot eax closure-fun-slot fun-pointer-lowtag))) (define-assembly-routine (throw (:return-style :none)) @@ -270,8 +265,7 @@ ;; be saved on the stack: the block in edx-tn, start in ebx-tn, and ;; count in ecx-tn. - (inst jmp (make-ea :byte :base block - :disp (* unwind-block-entry-pc-slot n-word-bytes)))) + (inst jmp (make-ea-for-object-slot block unwind-block-entry-pc-slot 0))) ;;;; Win32 non-local exit noise @@ -345,8 +339,7 @@ ;; Nlx-entry expects the arg start in ebx-tn and the arg count ;; in ecx-tn. Fortunately, that's where they are already. - (inst jmp (make-ea :byte :base block - :disp (* unwind-block-entry-pc-slot n-word-bytes)))) + (inst jmp (make-ea-for-object-slot block unwind-block-entry-pc-slot 0))) ;;;; Win32 UWP block SEH interface. @@ -430,8 +423,7 @@ (inst xor ecx-tn ecx-tn) (inst mov ebx-tn ebp-tn) (loadw ebp-tn block unwind-block-current-cont-slot) - (inst jmp (make-ea :byte :base block - :disp (* unwind-block-entry-pc-slot n-word-bytes)))) + (inst jmp (make-ea-for-object-slot block unwind-block-entry-pc-slot 0))) #!+win32 (define-assembly-routine (continue-unwind diff --git a/version.lisp-expr b/version.lisp-expr index bc899fd..0e42c0e 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.87" +"1.0.4.88"