Ignore:
Timestamp:
Sep 2, 2011, 5:43:41 AM (9 years ago)
Author:
gb
Message:

Try to speed up some cases involving self-calls where the number
of args is fixed, tail calls where some outgoing args are passed
on the stack, and the combination of those things. We generally
do the calls faster, but we don't really recognize that iteration's
being introduced (and that things are happening in a loop.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/compiler/X86/X8664/x8664-vinsns.lisp

    r14959 r14969  
    17811781;;; as well as this.
    17821782(define-x8664-vinsn (pass-multiple-values :jumplr) (()
    1783                                                   ()
    1784                                                   ((tag :u8)))
     1783                                                    ()
     1784                                                    ((tag :u8)))
    17851785  :resume
    17861786  (movl (:%l x8664::temp0) (:%l tag))
     
    17971797  (:anchored-uuo (uuo-error-not-callable)))
    17981798
     1799(define-x8664-vinsn (pass-multiple-values-known-function :jumplr) (((fnreg :lisp))
     1800                                                                    ())
     1801  (pushq (:@ (:apply + (:apply target-nil-value) (x8664::%kernel-global 'x86::ret1valaddr))))
     1802  (jmp (:%q fnreg)))
    17991803
    18001804
     
    45984602  (movsd (:%xmm val) (:@ (:%q base) (:%q idx))))
    45994603
     4604
     4605(define-x8664-vinsn pop-outgoing-arg (((n :u16const))
     4606                                      ())
     4607  (popq (:@ (:apply * n (- x8664::node-size)) (:%q x8664::rbp))))
     4608
     4609(define-x8664-vinsn slide-nth-arg (()
     4610                                   ((n :u16const)
     4611                                    (nstackargs :u16const)
     4612                                    (temp :lisp)))
     4613  (movq (:@ (:apply * (:apply - nstackargs (:apply + 1 n)) x8664::node-size) (:%q x8664::rsp)) (:%q temp))
     4614  (movq (:%q temp) (:@ (:apply * (:apply + n 1) (- x8664::node-size)) (:%q x8664::rbp))))
     4615                                   
     4616
     4617(define-x8664-vinsn set-tail-vsp (((nargs :u16const))
     4618                                  ())
     4619  ((:pred = 0 nargs)
     4620   (movq (:%q x8664::rbp) (:%q x8664::rsp)))
     4621  ((:not (:pred = 0 nargs))
     4622   (leaq (:@ (:apply * nargs (- x8664::node-size)) (:%q x8664::rbp)) (:%q x8664::rsp))))
     4623
     4624
     4625;;; If we've used one of the fixed-stack-args !slideN vinsns above
     4626;;; and are calling some function (rather than jumping to an internal
     4627;;; entry point), we need to push the caller's return address and unlink
     4628;;; its frame pointer.
     4629(define-x8664-vinsn prepare-tail-call (()
     4630                                       ())
     4631  (pushq (:@ x8664::node-size (:%q x8664::rbp)))
     4632  (movq (:@ (:%q x8664::rbp)) (:%q x8664::rbp)))
     4633
    46004634(queue-fixup
    46014635 (fixup-x86-vinsn-templates
Note: See TracChangeset for help on using the changeset viewer.