diff --git a/compiler/hppa/call.lisp b/compiler/hppa/call.lisp index f508ef723fc5168de8bbfedd5d2cf1078c0a8481..ffb306cbd92f512e1e560f6173558e0d888ccec7 100644 --- a/compiler/hppa/call.lisp +++ b/compiler/hppa/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/hppa/call.lisp,v 1.5 1993/01/15 22:46:05 wlott Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/hppa/call.lisp,v 1.6 1993/02/07 18:48:20 wlott Exp $") ;;; ;;; ********************************************************************** ;;; @@ -1132,36 +1132,37 @@ default-value-8 (:translate %listify-rest-args) (:policy :safe) (:generator 20 - (let ((loop (gen-label)) - (done (gen-label))) - (move context-arg context) - (move count-arg count) - ;; Check to see if there are any arguments. - (inst comb := count zero-tn done) - (move null-tn result) - - ;; We need to do this atomically. - (pseudo-atomic () + (move context-arg context) + (move count-arg count) + ;; Check to see if there are any arguments. + (inst comb := count zero-tn done) + (move null-tn result) + + ;; We need to do this atomically. + (pseudo-atomic () + (assemble () ;; Allocate a cons (2 words) for each item. (inst move alloc-tn result) (inst dep list-pointer-type 31 3 result) (move result dst) (inst sll count 1 temp) (inst add alloc-tn temp alloc-tn) - - (emit-label loop) + + LOOP ;; Grab one value and stash it in the car of this cons. (inst ldwm word-bytes context temp) (storew temp dst 0 vm:list-pointer-type) - + ;; Dec count, and if != zero, go back for more. (inst addi (* 2 vm:word-bytes) dst dst) (inst addib :> (fixnum -1) count loop :nullify t) (storew dst dst -1 list-pointer-type) - + ;; NIL out the last cons. - (storew null-tn dst -1 list-pointer-type)) - (emit-label done)))) + (storew null-tn dst -1 list-pointer-type) + ;; Clear out dst, because it points past the last cons. + (move null-tn dst))) + DONE))) ;;; Return the location and size of the more arg glob created by Copy-More-Arg. ;;; Supplied is the total number of arguments supplied (originally passed in diff --git a/compiler/mips/call.lisp b/compiler/mips/call.lisp index f994d8f97a07ee8e35d1d6deb438b78149d7e443..69ad228c1438d26562f8118661c1f51df718dedc 100644 --- a/compiler/mips/call.lisp +++ b/compiler/mips/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/mips/call.lisp,v 1.54 1993/02/04 15:51:25 wlott Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/mips/call.lisp,v 1.55 1993/02/07 18:48:56 wlott Exp $") ;;; ;;; ********************************************************************** ;;; @@ -1244,21 +1244,23 @@ default-value-8 ;; Store the current cons in the cdr of the previous cons. (emit-label loop) + (inst addu dst dst (* 2 word-bytes)) (storew dst dst -1 list-pointer-type) - ;; Grab one value and stash it in the car of this cons. (emit-label enter) + ;; Grab one value. (loadw temp context) (inst addu context context word-bytes) - (storew temp dst 0 list-pointer-type) ;; Dec count, and if != zero, go back for more. (inst addu count count (fixnum -1)) (inst bne count zero-tn loop) - (inst addu dst dst (* 2 word-bytes)) + + ;; Store the value in the car (in delay slot) + (storew temp dst 0 list-pointer-type) ;; NIL out the last cons. - (storew null-tn dst -1 list-pointer-type)) + (storew null-tn dst 1 list-pointer-type)) (emit-label done)))) #+gengc (define-vop (listify-rest-args) diff --git a/compiler/sparc/call.lisp b/compiler/sparc/call.lisp index 4d9536baeb83191dd2737bbe264f8499c0d0086d..fdfcacb3741d04e58e8f51594bb74e83854b2c22 100644 --- a/compiler/sparc/call.lisp +++ b/compiler/sparc/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/sparc/call.lisp,v 1.22 1993/01/15 22:49:18 wlott Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/sparc/call.lisp,v 1.23 1993/02/07 18:48:38 wlott Exp $") ;;; ;;; ********************************************************************** ;;; @@ -1141,18 +1141,16 @@ default-value-8 (:translate %listify-rest-args) (:policy :safe) (:generator 20 - (let ((enter (gen-label)) - (loop (gen-label)) - (done (gen-label))) - (move context context-arg) - (move count count-arg) - ;; Check to see if there are any arguments. - (inst cmp count) - (inst b :eq done) - (move result null-tn) - - ;; We need to do this atomically. - (pseudo-atomic () + (move context context-arg) + (move count count-arg) + ;; Check to see if there are any arguments. + (inst cmp count) + (inst b :eq done) + (move result null-tn) + + ;; We need to do this atomically. + (pseudo-atomic () + (assemble () ;; Allocate a cons (2 words) for each item. (inst andn result alloc-tn lowtag-mask) (inst or result list-pointer-type) @@ -1161,24 +1159,27 @@ default-value-8 (inst b enter) (inst add alloc-tn temp) - ;; Store the current cons in the cdr of the previous cons. - (emit-label loop) + ;; Compute the next cons and store it in the current one. + LOOP + (inst add dst dst (* 2 vm:word-bytes)) (storew dst dst -1 vm:list-pointer-type) - ;; Grab one value and stash it in the car of this cons. - (emit-label enter) + ;; Grab one value. + ENTER (loadw temp context) (inst add context context vm:word-bytes) - (storew temp dst 0 vm:list-pointer-type) ;; Dec count, and if != zero, go back for more. (inst subcc count (fixnum 1)) (inst b :gt loop) - (inst add dst dst (* 2 vm:word-bytes)) + + ;; Store the value into the car of the current cons (in the delay + ;; slot). + (storew temp dst 0 vm:list-pointer-type) ;; NIL out the last cons. - (storew null-tn dst -1 vm:list-pointer-type)) - (emit-label done)))) + (storew null-tn dst 1 vm:list-pointer-type))) + DONE))) ;;; Return the location and size of the more arg glob created by Copy-More-Arg.