Changeset 6462


Ignore:
Timestamp:
May 9, 2007, 7:29:02 AM (15 years ago)
Author:
gb
Message:

move away from lea/jmp, towards call/ret.
rcx is now an imm reg; ra0 = temp2.
new tra scheme.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/compiler/X86/X8664/x8664-arch.lisp

    r5981 r6462  
    142142  fs
    143143  gs
     144  rip
    144145  )
    145146
     
    165166(defx86reg temp0.b bl)
    166167
    167 (defx86reg temp2 rcx)
    168 (defx86reg temp2.l ecx)
     168(defx86reg imm2 rcx)
     169(defx86reg imm2.l ecx)
    169170(defx86reg nargs cx)
    170171(defx86reg nargs.l ecx)
    171172(defx86reg nargs.q rcx)
    172 (defx86reg temp2.w cx)
    173 (defx86reg temp2.b cl)
     173(defx86reg imm2.w cx)
     174(defx86reg imm2.b cl)
    174175(defx86reg shift cl)
    175176
     
    203204(defx86reg ra0.w r10w)
    204205(defx86reg ra0.b r10b)
     206
     207(defx86reg temp2 r10)
     208(defx86reg temp2.l r10d)
     209(defx86reg temp2.w r10w)
     210(defx86reg temp2.b r10b)
     211
    205212
    206213(defx86reg save3 r11)
     
    741748  #+darwin-target #x100003d)
    742749
    743 (defconstant gf-code-size 16)
     750(defconstant gf-code-size 18)
    744751
    745752(defun %kernel-global (sym)
     
    10911098         (defx8664subprim .SPbind-interrupt-level-0)
    10921099         (defx8664subprim .SPprogvrestore)
     1100         (defx8664subprim .SPnmkunwind)
     1101         
    10931102         )))))
    10941103
     
    12381247  `(ccl::%setf-macptr
    12391248    ,dest
    1240     (ccl::%fixnum-ref-natural 0 (+ x8664::nil-value
     1249    (ccl::%int-to-ptr (ccl::%fixnum-ref-natural 0 (+ x8664::nil-value
    12411250                                 ,(%kernel-global
    12421251                                   (if (ccl::quoted-form-p name)
    12431252                                     (cadr name)
    1244                                      name))))))
     1253                                     name)))))))
    12451254
    12461255(defx8664archmacro ccl::%target-kernel-global (name)
     
    12821291    `(ccl::%stack-block ((,buf ,size :clear t))
    12831292      ,@body)))
    1284  
     1293
     1294;;; an (lea (@ disp (% rip)) (% fn)) instruction following a tagged
     1295;;; return address helps the runtime map from the return address to
     1296;;; the containing function.  That instuction is 7 bytes long: 3
     1297;;; bytes of code followed by 4 bytes of displacement.  The constant
     1298;;; part of that - assuming that FN is R13 - looks like #x4c #x8d #x2d.
     1299
     1300(defconstant recover-fn-from-rip-length 7)
     1301(defconstant recover-fn-from-rip-disp-offset 3)
     1302(defconstant recover-fn-from-rip-word0 #x8d4c)
     1303(defconstant recover-fn-from-rip-byte2 #x2d)
    12851304
    12861305
Note: See TracChangeset for help on using the changeset viewer.