Changeset 8349


Ignore:
Timestamp:
Jan 29, 2008, 7:17:38 AM (12 years ago)
Author:
rme
Message:

Don't open-code funcall. Fixes to %symbol->symptr, setup-macptr-allocation,
and tail-funcall.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ia32/compiler/X86/X8632/x8632-vinsns.lisp

    r8256 r8349  
    25142514                                     ((src :lisp))
    25152515                                     ((tag :u8)))
    2516   ;; nilsym?
    25172516  (cmpl (:$l x8632::nil-value) (:%l src))
    25182517  (je :nilsym)
    2519   ;; tag-misc?
     2518  (movl (:%l src) (:%l tag))
    25202519  (andb (:$b x8632::tagmask) (:%b tag))
    25212520  (cmpb (:$b x8632::tag-misc) (:%b tag))
    25222521  (jne :bad)
    2523   ;; symbol?
    2524   (movb (:@ x8632::misc-subtag-offset) (:%b tag))
     2522  (movb (:@ x8632::misc-subtag-offset (:%l src)) (:%b tag))
    25252523  (cmpb (:$b x8632::subtag-symbol) (:%b tag))
    25262524  (jne :bad)
     
    27002698(define-x8632-vinsn setup-macptr-allocation (()
    27012699                                             ((src :address)))
    2702   (movd (:%l src) (:%mmx x8632::mm1))
    2703   (movl (:$l x8632::macptr-header) (:%l x8632::mm0))
     2700  (movd (:%l src) (:%mmx x8632::mm1))   ;see %set-new-macptr-value, below
     2701  (movl (:$l x8632::macptr-header) (:%l x8632::imm0))
     2702  (movd (:%l x8632::imm0) (:%mmx x8632::mm0))
    27042703  (movl (:$l (- x8632::macptr.size x8632::fulltag-misc)) (:%l x8632::imm0)))
    27052704
     
    29392938  (jmp (:@ .SPmkunwind)))
    29402939
    2941 
    29422940;;; Funcall the function or symbol in temp0 and obtain the single
    29432941;;; value that it returns.
    2944 (define-x8632-vinsn funcall (()
    2945                              ()
    2946                              ((tag :u8)
    2947                               (entry (:label 1))))
    2948   ;; tag is almost certainly going to be eax, which is
    2949   ;; the same as nargs.  we need to preserve nargs.
    2950   (pushl (:%l x8632::nargs.l))
    2951   (movl (:%l x8632::temp0) (:%l tag))
    2952   ((:pred = (:apply %hard-regspec-value tag) x8632::eax)
    2953    ;; accumulator
    2954    (andl (:$b x8632::tagmask) (:%accl tag))
    2955    (cmpl (:$b x8632::tag-misc) (:%accl tag)))
    2956   ((:pred > (:apply %hard-regspec-value tag) x8632::eax)
    2957    (andl (:$b x8632::tagmask) (:%l tag))
    2958    (cmpl (:$b x8632::tag-misc) (:%l tag)))
    2959   (jne :bad)
    2960   (movb (:@ x8632::misc-subtag-offset (:%l x8632::temp0)) (:%b tag))
    2961   (cmpb (:$b x8632::subtag-function) (:%b tag))
    2962   (cmovel (:%l x8632::temp0) (:%l x8632::xfn))
    2963   (je :call)
    2964   (cmpb (:$b x8632::subtag-symbol) (:%b tag))
    2965   (cmovel (:%l x8632::symbol.fcell (:%l x8632::fname)) (:%l x8632::xfn))
    2966   (jne :bad)
    2967   :call
    2968   (popl (:%l x8632::nargs))
    2969   (:talign 5)
    2970   (call (:%l x8632::xfn))
    2971   (movl (:$self 0) (:%l x8632::fn))
    2972   :bad
    2973   (uuo-error-not-callable))
     2942(define-x8632-subprim-call-vinsn (funcall) .SPfuncall)
    29742943
    29752944(define-x8632-vinsn tail-funcall (()
     
    30803049   ((:pred > n 1)
    30813050    (movl (:$l n) (:%l temp))
    3082     (:talign 4)
     3051    (:talign 5)
    30833052    (call (:@ .SPunbind-n)))
    30843053   ((:pred = n 1)
Note: See TracChangeset for help on using the changeset viewer.