X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fx86-64%2Fsubprim.lisp;h=2079764df37a4d5f2c4796c5d7ef437daea5aebd;hb=ac405df3f196d58f6a5a2003afd8f48f490300df;hp=74692e8adcaf39be4f27977d1958850ba491e43a;hpb=4dc4761909992ceb346d003f3fb19e5c837ee985;p=sbcl.git diff --git a/src/compiler/x86-64/subprim.lisp b/src/compiler/x86-64/subprim.lisp index 74692e8..2079764 100644 --- a/src/compiler/x86-64/subprim.lisp +++ b/src/compiler/x86-64/subprim.lisp @@ -18,7 +18,7 @@ (:translate length) (:args (object :scs (descriptor-reg control-stack) :target ptr)) (:arg-types list) - (:temporary (:sc unsigned-reg :offset eax-offset) eax) + (:temporary (:sc dword-reg :offset eax-offset) eax) (:temporary (:sc descriptor-reg :from (:argument 0)) ptr) (:results (count :scs (any-reg))) (:result-types positive-fixnum) @@ -28,7 +28,7 @@ (:generator 40 ;; Move OBJECT into a temp we can bash on, and initialize the count. (move ptr object) - (inst xor count count) + (zeroize count) ;; If we are starting with NIL, then it's really easy. (inst cmp ptr nil-value) (inst jmp :e DONE) @@ -43,12 +43,12 @@ (inst jmp :e DONE) ;; Otherwise, check to see whether we hit the end of a dotted list. If ;; not, loop back for more. - (move eax ptr) + (move eax (make-dword-tn ptr)) (inst and al-tn lowtag-mask) (inst cmp al-tn list-pointer-lowtag) (inst jmp :e LOOP) ;; It's dotted all right. Flame out. - (error-call vop object-not-list-error ptr) + (error-call vop 'object-not-list-error ptr) ;; We be done. DONE)) @@ -66,7 +66,7 @@ ;; Get a copy of OBJECT in a register we can bash on, and ;; initialize COUNT. (move ptr object) - (inst xor count count) + (zeroize count) ;; If we are starting with NIL, we be done. (inst cmp ptr nil-value) (inst jmp :e DONE) @@ -80,3 +80,5 @@ DONE)) (define-static-fun length (object) :translate length) +(define-static-fun %coerce-callable-to-fun (callable) + :translate %coerce-callable-to-fun)