X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fx86-64%2Fsubprim.lisp;h=a779d13d37d4a22ce1cf0d139eef011278899c41;hb=b83353d9f998e5c0e34604b5593df70c66d2c510;hp=4b3eed29892192fd10305d994d2f6944896e9c38;hpb=e188f845350da58ffd0f52f08f21cb06cd57c584;p=sbcl.git diff --git a/src/compiler/x86-64/subprim.lisp b/src/compiler/x86-64/subprim.lisp index 4b3eed2..a779d13 100644 --- a/src/compiler/x86-64/subprim.lisp +++ b/src/compiler/x86-64/subprim.lisp @@ -18,13 +18,14 @@ (: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) (:policy :fast-safe) (:vop-var vop) (:save-p :compute-only) + (:ignore eax) (:generator 40 ;; Move OBJECT into a temp we can bash on, and initialize the count. (move ptr object) @@ -43,12 +44,9 @@ (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) - (inst and al-tn lowtag-mask) - (inst cmp al-tn list-pointer-lowtag) - (inst jmp :e LOOP) + (%test-lowtag ptr LOOP nil list-pointer-lowtag) ;; 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)) @@ -80,3 +78,5 @@ DONE)) (define-static-fun length (object) :translate length) +(define-static-fun %coerce-callable-to-fun (callable) + :translate %coerce-callable-to-fun)