diff --git a/assembly/x86/assem-rtns.lisp b/assembly/x86/assem-rtns.lisp index e73610f0903915fad24977724930477c855dcc8a..cb4fb92d9e734dec963559e4f00a2734cb50c1ef 100644 --- a/assembly/x86/assem-rtns.lisp +++ b/assembly/x86/assem-rtns.lisp @@ -7,7 +7,7 @@ ;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/assembly/x86/assem-rtns.lisp,v 1.6 2003/08/03 11:27:50 gerd Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/assembly/x86/assem-rtns.lisp,v 1.7 2008/04/01 07:25:08 cshapiro Exp $") ;;; ;;; ********************************************************************** ;;; @@ -59,11 +59,12 @@ ;; to iterate from larger addresses to smaller addresses. ;; pfw-this says copy ecx words from esi to edi counting down. (inst shr ecx 2) ; fixnum to raw word count - (inst std) ; count down (inst sub esi 4) ; ? (inst lea edi (make-ea :dword :base ebx :disp (- word-bytes))) + (inst std) ; count down (inst rep) (inst movs :dword) + (inst cld) ;; Restore the count. (inst mov ecx edx) @@ -153,11 +154,12 @@ ;; Do the blit. Because we are coping from smaller addresses to larger ;; addresses, we have to start at the largest pair and work our way down. (inst shr ecx 2) ; fixnum to raw words - (inst std) ; count down (inst lea edi (make-ea :dword :base ebp-tn :disp (- word-bytes))) (inst sub esi (fixnumize 1)) + (inst std) ; count down (inst rep) (inst movs :dword) + (inst cld) ;; Load the register arguments carefully. (loadw edx ebp-tn -1) diff --git a/compiler/x86/call.lisp b/compiler/x86/call.lisp index 5e88ddc857bc2cf437d852ee97e354349303e8ea..d93387a6bc254acaef40d5e0f0436f345497ffa8 100644 --- a/compiler/x86/call.lisp +++ b/compiler/x86/call.lisp @@ -7,7 +7,7 @@ ;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/x86/call.lisp,v 1.20 2004/10/04 02:39:18 rtoy Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/x86/call.lisp,v 1.21 2008/04/01 07:25:09 cshapiro Rel $") ;;; ;;; ********************************************************************** ;;; @@ -395,7 +395,6 @@ ;; Load EAX with NIL so we can quickly store it, and set up stuff ;; for the loop. (inst mov eax-tn nil-value) - (inst std) (inst mov ecx-tn (- nvals register-arg-count)) ;; Jump into the default loop. (inst jmp default-stack-vals) @@ -431,6 +430,7 @@ (inst std) (inst rep) (inst movs :dword) + (inst cld) ;; Restore ESI. (loadw esi-tn ebx-tn (- (1+ 2))) ;; Now we have to default the remaining args. Find out how many. @@ -444,8 +444,10 @@ (inst mov eax-tn nil-value) ;; Do the store. (emit-label default-stack-vals) + (inst std) (inst rep) (inst stos eax-tn) + (inst cld) ;; Restore EDI, and reset the stack. (emit-label restore-edi) (loadw edi-tn ebx-tn (- (1+ 1))) @@ -1271,7 +1273,6 @@ (inst shr ecx-tn word-shift) ; make word count ;; And copy the args. - (inst cld) ; auto-inc ESI and EDI. (inst rep) (inst movs :dword) @@ -1380,8 +1381,6 @@ (inst lea dst (make-ea :byte :base dst :disp list-pointer-type)) ;; Convert the count into a raw value, so we can use the LOOP inst. (inst shr ecx 2) - ;; Set decrement mode (successive args at lower addresses) - (inst std) ;; Set up the result. (move result dst) ;; Jump into the middle of the loop, 'cause that's were we want @@ -1394,7 +1393,8 @@ (storew dst dst -1 list-pointer-type) (emit-label enter) ;; Grab one value and stash it in the car of this cons. - (inst lods eax) + (inst mov eax (make-ea :dword :base src)) + (inst sub src 4) (storew eax dst 0 list-pointer-type) ;; Go back for more. (inst loop loop) diff --git a/compiler/x86/nlx.lisp b/compiler/x86/nlx.lisp index a9e3df240a46650aab279a0922e92d134cccac33..cf1a448fc14bff2995b20044651233e4f74b84d7 100644 --- a/compiler/x86/nlx.lisp +++ b/compiler/x86/nlx.lisp @@ -7,7 +7,7 @@ ;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/x86/nlx.lisp,v 1.15 2003/08/03 11:27:45 gerd Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/x86/nlx.lisp,v 1.16 2008/04/01 07:25:09 cshapiro Rel $") ;;; ;;; ********************************************************************** ;;; @@ -244,6 +244,7 @@ (inst std) (inst rep) (inst movs :dword) + (inst cld) DONE ;; Reset the CSP at last moved arg. diff --git a/compiler/x86/values.lisp b/compiler/x86/values.lisp index e2e2875133ce2193efa11c2d0f52e738bd938f1c..43c0d71e39059fc585d13c486efdbca5f6c90d33 100644 --- a/compiler/x86/values.lisp +++ b/compiler/x86/values.lisp @@ -7,7 +7,7 @@ ;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/x86/values.lisp,v 1.5 2003/08/03 11:27:45 gerd Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/x86/values.lisp,v 1.6 2008/04/01 07:25:09 cshapiro Rel $") ;;; ;;; ********************************************************************** ;;; @@ -125,9 +125,9 @@ (inst shr temp1 word-shift) ; convert the fixnum to a count. - (inst std) ; move down the stack as more value are copied to the bottom. LOOP - (inst lods temp) + (inst mov temp (make-ea :dword :base src)) + (inst sub src 4) (inst push temp) (inst loop loop)