Changeset 15114


Ignore:
Timestamp:
Dec 6, 2011, 6:21:40 PM (8 years ago)
Author:
rme
Message:

In the following vinsns, don't use x8664::stack-temp (which is
an MMX register), and list all temporaries explicitly:

make-tsp-cons, make-fixed-stack-gvector, temp-push-unboxed-word,
temp-push-node, temp-push-double-float, macptr->stack,
alloc-c-frame, alloc-variable-c-frame, make-tsp-vcell

File:
1 edited

Legend:

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

    r15112 r15114  
    18371837(define-x8664-vinsn make-tsp-cons (((dest :lisp))
    18381838                                   ((car :lisp) (cdr :lisp))
    1839                                    ((temp :imm)))
     1839                                   ((temp :imm)
     1840                                    (stack-temp :imm)))
    18401841  (subq (:$b (+ x8664::cons.size x8664::dnode-size)) (:rcontext x8664::tcr.next-tsp))
    18411842  (movq (:rcontext x8664::tcr.next-tsp) (:%q temp))
    18421843  (movapd (:%xmm x8664::fpzero) (:@ (:%q temp)))
    18431844  (movapd (:%xmm x8664::fpzero) (:@ 16 (:%q temp)))
    1844   (movq (:rcontext x8664::tcr.save-tsp) (:%mmx x8664::stack-temp))
    1845   (movq (:%mmx x8664::stack-temp) (:@ (:%q temp)))
     1845  (movq (:rcontext x8664::tcr.save-tsp) (:%q stack-temp))
     1846  (movq (:%q stack-temp) (:@ (:%q temp)))
    18461847  (movq (:% x8664::rbp) (:@ x8664::tsp-frame.rbp (:%q temp)))
    18471848  (movq (:%q temp) (:rcontext x8664::tcr.save-tsp))
     
    18551856                                               (header :s32const))
    18561857                                              ((tempa :imm)
    1857                                                (tempb :imm)))
     1858                                               (tempb :imm)
     1859                                               (stack-temp :imm)))
    18581860  ((:and (:pred >= (:apply + aligned-size x8664::dnode-size) -128)
    18591861         (:pred <= (:apply + aligned-size x8664::dnode-size) 127))
     
    18661868  (movq (:rcontext x8664::tcr.save-tsp) (:%q tempb))
    18671869  (movq (:rcontext x8664::tcr.next-tsp) (:%q tempa))
    1868   (movd (:%q tempb) (:%mmx x8664::stack-temp))
     1870  (movq (:%q tempb) (:%q stack-temp))
    18691871  :loop
    18701872  (movapd (:%xmm x8664::fpzero) (:@ -16 (:%q tempb)))
     
    18721874  (cmpq (:%q tempa) (:%q tempb))
    18731875  (jnz :loop)
    1874   (movq (:%mmx x8664::stack-temp) (:@ (:%q tempa)))
     1876  (movq (:%q stack-temp) (:@ (:%q tempa)))
    18751877  (movq (:% x8664::rbp) (:@ x8664::tsp-frame.rbp (:%q tempa)))
    18761878  (movq (:%q tempa) (:rcontext x8664::tcr.save-tsp))
     
    22382240(define-x8664-vinsn (temp-push-unboxed-word :push :word :csp)
    22392241    (()
    2240      ((w :u64)))
    2241   (movq (:rcontext x8664::tcr.foreign-sp) (:%mmx x8664::stack-temp)) 
     2242     ((w :u64))
     2243     ((temp :imm)
     2244      (stack-temp :imm)))
     2245  (movq (:rcontext x8664::tcr.foreign-sp) (:%q stack-temp))
    22422246  (subq (:$b (* 2 x8664::dnode-size)) (:rcontext x8664::tcr.foreign-sp))
    2243   (movq (:rcontext x8664::tcr.foreign-sp) (:%q x8664::ra0))
    2244   (movq (:%mmx x8664::stack-temp) (:@ (:%q x8664::ra0)))
    2245   (movq (:% x8664::rbp) (:@ x8664::csp-frame.rbp (:%q x8664::ra0)))
    2246   (movq (:%q w) (:@ x8664::dnode-size (:%q x8664::ra0))))
     2247  (movq (:rcontext x8664::tcr.foreign-sp) (:%q temp))
     2248  (movq (:%q stack-temp) (:@ (:%q temp)))
     2249  (movq (:% x8664::rbp) (:@ x8664::csp-frame.rbp (:%q temp)))
     2250  (movq (:%q w) (:@ x8664::dnode-size (:%q temp))))
    22472251
    22482252
     
    22502254        (()
    22512255         ((w :lisp))
    2252          ((temp :imm)))
     2256         ((temp :imm)
     2257          (stack-temp :imm)))
    22532258  (subq (:$b (* 2 x8664::dnode-size)) (:rcontext x8664::tcr.next-tsp))
    2254   (movq (:rcontext x8664::tcr.save-tsp) (:%mmx x8664::stack-temp))
     2259  (movq (:rcontext x8664::tcr.save-tsp) (:%q stack-temp))
    22552260  (movq (:rcontext x8664::tcr.next-tsp) (:%q temp))
    22562261  (movapd (:%xmm x8664::fpzero) (:@ (:%q temp)))
    22572262  (movapd (:%xmm x8664::fpzero) (:@ 16 (:%q temp)))
    2258   (movq (:%mmx x8664::stack-temp) (:@ (:%q temp)))
     2263  (movq (:%q stack-temp) (:@ (:%q temp)))
    22592264  (movq (:% x8664::rbp) (:@ x8664::tsp-frame.rbp (:%q temp))) 
    22602265  (movq (:%q temp) (:rcontext x8664::tcr.save-tsp))
     
    22632268(define-x8664-vinsn (temp-push-double-float :push :word :csp)
    22642269    (()
    2265      ((f :double-float)))
    2266   (movq (:rcontext x8664::tcr.foreign-sp) (:%mmx x8664::stack-temp)) 
     2270     ((f :double-float))
     2271     ((temp :imm)
     2272      (stack-temp :imm)))
     2273  (movq (:rcontext x8664::tcr.foreign-sp) (:%q stack-temp)) 
    22672274  (subq (:$b (* 2 x8664::dnode-size)) (:rcontext x8664::tcr.foreign-sp))
    2268   (movq (:rcontext x8664::tcr.foreign-sp) (:%q x8664::ra0)) 
    2269   (movq (:%mmx x8664::stack-temp) (:@ (:%q x8664::ra0)))
    2270   (movq (:% x8664::rbp) (:@ x8664::csp-frame.rbp (:%q x8664::ra0)))
    2271   (movapd (:%xmm f) (:@ x8664::dnode-size (:%q x8664::ra0))))
     2275  (movq (:rcontext x8664::tcr.foreign-sp) (:%q temp)) 
     2276  (movq (:%q stack-temp) (:@ (:%q temp)))
     2277  (movq (:% x8664::rbp) (:@ x8664::csp-frame.rbp (:%q temp)))
     2278  (movapd (:%xmm f) (:@ x8664::dnode-size (:%q temp))))
    22722279
    22732280
     
    23122319
    23132320(define-x8664-vinsn macptr->stack (((dest :lisp))
    2314                                    ((ptr :address)))
    2315   (movq (:rcontext x8664::tcr.foreign-sp) (:%mmx x8664::stack-temp))
     2321                                   ((ptr :address))
     2322                                   ((temp :imm)
     2323                                    (stack-temp :imm)))
     2324  (movq (:rcontext x8664::tcr.foreign-sp) (:%q stack-temp))
    23162325  (subq (:$b (+ x8664::dnode-size x8664::macptr.size)) (:rcontext x8664::tcr.foreign-sp))
    2317   (movq (:rcontext x8664::tcr.foreign-sp) (:%q x8664::ra0))
    2318   (movq (:%mmx x8664::stack-temp) (:@ (:%q x8664::ra0)))
    2319   (movq (:% x8664::rbp) (:@ x8664::csp-frame.rbp (:%q x8664::ra0)))
    2320   (leaq (:@ (+ x8664::dnode-size x8664::fulltag-misc) (:%q  x8664::ra0)) (:%q dest))
     2326  (movq (:rcontext x8664::tcr.foreign-sp) (:%q temp))
     2327  (movq (:%q stack-temp) (:@ (:%q temp)))
     2328  (movq (:% x8664::rbp) (:@ x8664::csp-frame.rbp (:%q temp)))
     2329  (leaq (:@ (+ x8664::dnode-size x8664::fulltag-misc) (:%q temp)) (:%q dest))
    23212330  (movq (:$l x8664::macptr-header) (:@ x8664::macptr.header (:%q dest)))
    23222331  (movq (:%q ptr) (:@ x8664::macptr.address (:%q dest)))
     
    37473756
    37483757(define-x8664-vinsn alloc-c-frame (()
    3749                                    ((nwords :u32const)))
    3750   (movq (:rcontext x8664::tcr.foreign-sp) (:%mmx x8664::stack-temp))
     3758                                   ((nwords :u32const))
     3759                                   ((temp :imm)
     3760                                    (stack-temp :imm)))
     3761  (movq (:rcontext x8664::tcr.foreign-sp) (:%q stack-temp))
    37513762  ((:pred < (:apply ash (:apply logandc2 (:apply + nwords 9) 1) x8664::word-shift) 128)
    37523763   (subq (:$b (:apply ash (:apply logandc2 (:apply + nwords 9) 1) x8664::word-shift)) (:rcontext x8664::tcr.foreign-sp)))
    37533764  ((:not (:pred < (:apply ash (:apply logandc2 (:apply + nwords 9) 1) x8664::word-shift) 128))
    37543765   (subq (:$l (:apply ash (:apply logandc2 (:apply + nwords 9) 1) x8664::word-shift)) (:rcontext x8664::tcr.foreign-sp)))
    3755   (movq (:rcontext x8664::tcr.foreign-sp) (:%q x8664::ra0))
    3756   (movq (:%mmx x8664::stack-temp) (:@ (:%q x8664::ra0)))
    3757   (movq (:% x8664::rbp) (:@ x8664::csp-frame.rbp (:%q x8664::ra0))))
     3766  (movq (:rcontext x8664::tcr.foreign-sp) (:%q temp))
     3767  (movq (:%q stack-temp) (:@ (:%q temp)))
     3768  (movq (:% x8664::rbp) (:@ x8664::csp-frame.rbp (:%q temp))))
    37583769
    37593770(define-x8664-vinsn alloc-variable-c-frame (()
    37603771                                            ((nwords :imm))
    3761                                             ((size :s64)))
     3772                                            ((size :s64)
     3773                                             (temp :imm)
     3774                                             (stack-temp :imm)))
    37623775  (leaq (:@ (* 9 x8664::node-size) (:%q nwords)) (:%q size))
    37633776  (andb (:$b (lognot x8664::fulltagmask)) (:%b size))
    37643777
    3765   (movq (:rcontext x8664::tcr.foreign-sp) (:%mmx x8664::stack-temp))
     3778  (movq (:rcontext x8664::tcr.foreign-sp) (:%q stack-temp))
    37663779  (subq (:%q size) (:rcontext x8664::tcr.foreign-sp))
    3767   (movq (:rcontext x8664::tcr.foreign-sp) (:%q x8664::ra0))
    3768   (movq (:%mmx x8664::stack-temp) (:@ (:%q x8664::ra0)))
    3769   (movq (:% x8664::rbp) (:@ x8664::csp-frame.rbp (:%q x8664::ra0))))
     3780  (movq (:rcontext x8664::tcr.foreign-sp) (:%q temp))
     3781  (movq (:%q stack-temp) (:@ (:%q temp)))
     3782  (movq (:% x8664::rbp) (:@ x8664::csp-frame.rbp (:%q temp))))
    37703783
    37713784(define-x8664-vinsn set-c-arg (()
     
    38223835(define-x8664-vinsn make-tsp-vcell (((dest :lisp))
    38233836                                    ((closed :lisp))
    3824                                     ((temp :imm)))
     3837                                    ((temp :imm)
     3838                                     (stack-temp :imm)))
    38253839  (subq (:$b (+ x8664::value-cell.size x8664::dnode-size)) (:rcontext x8664::tcr.next-tsp))
    3826   (movq (:rcontext x8664::tcr.save-tsp) (:%mmx x8664::stack-temp))
     3840  (movq (:rcontext x8664::tcr.save-tsp) (:%q stack-temp))
    38273841  (movq (:rcontext x8664::tcr.next-tsp) (:%q temp))
    38283842  (movapd (:%xmm x8664::fpzero) (:@ (:%q temp)))
    38293843  (movapd (:%xmm x8664::fpzero) (:@ x8664::dnode-size (:%q temp)))
    3830   (movq (:%mmx x8664::stack-temp) (:@ (:%q temp)))
     3844  (movq (:%q stack-temp) (:@ (:%q temp)))
    38313845  (movq (:% x8664::rbp) (:@ x8664::tsp-frame.rbp (:%q temp))) 
    38323846  (movq (:%q temp) (:rcontext x8664::tcr.save-tsp)) 
Note: See TracChangeset for help on using the changeset viewer.