Ignore:
Timestamp:
Oct 14, 2008, 6:30:00 PM (13 years ago)
Author:
gz
Message:

Merge/bootstrap assorted low level stuff from trunk - kernel, syscall stuff, lowmem-bias, formatting tweaks, a few bug fixes included

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711/ccl/compiler/X86/x86-lapmacros.lisp

    r11069 r11089  
    3030
    3131(defx86lapmacro set-nargs (n)
    32   (let* ((many (target-arch-case
    33                 (:x8632 32)
    34                 (:x8664 16))))
    35     (cond ((>= n many) `(movl ($ ',n) (% nargs)))
    36           ((= n 0) `(xorl (% nargs) (% nargs)))
    37           (t `(progn
    38                 (xorl (% nargs) (% nargs))
    39                 (addl ($ ',n) (% nargs)))))))
    40        
     32  (cond ((= n 0) `(xorl (% nargs) (% nargs)))
     33        (t `(movl ($ ',n) (% nargs)))))
    4134
    4235(defx86lapmacro anchored-uuo (form)
     
    145138
    146139(defx86lapmacro trap-unless-typecode= (node tag &optional (immreg 'imm0))
    147   (let* ((ok (gensym)))
    148     `(progn
     140  (let* ((bad (gensym))
     141         (anchor (gensym)))
     142    `(progn
     143      ,anchor
    149144      (extract-typecode ,node ,immreg)
    150145      (cmpb ($ ,tag) (%b ,immreg))
    151       (je.pt ,ok)
    152       (uuo-error-reg-not-tag (% ,node) ($ ,tag))
    153       ,ok)))
     146      (jne ,bad)
     147      (:anchored-uuo-section ,anchor)
     148      ,bad
     149      (:anchored-uuo (uuo-error-reg-not-tag (% ,node) ($ ,tag)))
     150      (:main-section nil))))
    154151
    155152(defx86lapmacro trap-unless-fulltag= (node tag &optional (immreg 'imm0))
     
    401398       (pushq (% rbp))
    402399       (movq (% rsp) (% rbp))))))
    403  
     400
     401(defx86lapmacro save-stackargs-frame (nstackargs)
     402  (target-arch-case
     403   (:x8632
     404    `(progn
     405      (movl (% ebp) (@ ,(* (1+ nstackargs) x8632::node-size) (% esp)))
     406      (leal (@ ,(* (1+ nstackargs) x8632::node-size) (% esp)) (% ebp))
     407      (popl (@ x8632::node-size (% ebp)))))
     408   (:x8664
     409    `(progn
     410      (movq (% rbp) (@ ,(* (1+ nstackargs) x8664::node-size) (% rsp)))
     411      (leaq (@ ,(* (1+ nstackargs) x8664::node-size) (% rsp)) (% rbp))
     412      (popq (@ x8632::node-size (% rbp)))))))
     413
    404414(defx86lapmacro save-frame-variable-arg-count ()
    405415  (let* ((push (gensym))
Note: See TracChangeset for help on using the changeset viewer.