Changeset 11056


Ignore:
Timestamp:
Oct 12, 2008, 7:55:44 AM (11 years ago)
Author:
gb
Message:

Use an achored (out-of-line) UUO in trap-unless-typecode=.

Add SAVE-STACKARGS-FRAME, which does what the compiler does when a
known number of incoming args (and a reserved frame) were pushed
on the stack.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/compiler/X86/x86-lapmacros.lisp

    r10959 r11056  
    145145
    146146(defx86lapmacro trap-unless-typecode= (node tag &optional (immreg 'imm0))
    147   (let* ((ok (gensym)))
    148     `(progn
     147  (let* ((bad (gensym))
     148         (anchor (gensym)))
     149           
     150    `(progn
     151      ,anchor
    149152      (extract-typecode ,node ,immreg)
    150153      (cmpb ($ ,tag) (%b ,immreg))
    151       (je.pt ,ok)
    152       (uuo-error-reg-not-tag (% ,node) ($ ,tag))
    153       ,ok)))
     154      (jne ,bad)
     155      (:anchored-uuo-section ,anchor)
     156      ,bad
     157      (:anchored-uuo (uuo-error-reg-not-tag (% ,node) ($ ,tag)))
     158      (:main-section nil))))
    154159
    155160(defx86lapmacro trap-unless-fulltag= (node tag &optional (immreg 'imm0))
     
    401406       (pushq (% rbp))
    402407       (movq (% rsp) (% rbp))))))
     408
     409(defx86lapmacro save-stackargs-frame (nstackargs)
     410  (target-arch-case
     411   (:x8632
     412    `(progn
     413      (movl (% ebp) (@ ,(* (1+ nstackargs) x8632::node-size) (% esp)))
     414      (leal (@ ,(* (1+ nstackargs) x8632::node-size) (% esp)) (% ebp))
     415      (popl (@ x8632::node-size (% ebp)))))
     416   (:x8664
     417    `(progn
     418      (movq (% rbp) (@ ,(* (1+ nstackargs) x8664::node-size) (% rsp)))
     419      (leaq (@ ,(* (1+ nstackargs) x8664::node-size) (% rsp)) (% rbp))
     420      (popq (@ x8632::node-size (% rbp)))))))
     421   
    403422 
    404423(defx86lapmacro save-frame-variable-arg-count ()
Note: See TracChangeset for help on using the changeset viewer.