Changeset 11187


Ignore:
Timestamp:
Oct 21, 2008, 11:19:26 PM (11 years ago)
Author:
gb
Message:

Make-callback-trampoline: optional argument is count of stack argument
bytes to ignore. On x8632, store this (as word count) in upper byte
of callback index in generated trampoline function.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-1/x86-callback-support.lisp

    r10132 r11187  
    1919
    2020#+x8664-target 
    21 (defun make-callback-trampoline (index &optional monitor-exception-ports)
    22   (declare (ignorable monitor-exception-ports))
     21(defun make-callback-trampoline (index &optional discard-stack-bytes)
     22  (declare (ignore discard-stack-bytes))
    2323  (let* ((p (%allocate-callback-pointer 16))
    2424         (addr #.(subprim-name->offset '.SPcallback)))
     
    4040         
    4141#+x8632-target         
    42 (defun make-callback-trampoline (index &optional monitor-exception-ports)
    43   (declare (ignorable monitor-exception-ports))
     42(defun make-callback-trampoline (index &optional (discard-stack-bytes 0))
    4443  (let* ((p (%allocate-callback-pointer 12))
    4544         (addr #.(subprim-name->offset '.SPcallback)))
     
    4847          (%get-unsigned-byte p 2) (ldb (byte 8 8) index)
    4948          (%get-unsigned-byte p 3) (ldb (byte 8 16) index)
    50           (%get-unsigned-byte p 4) (ldb (byte 8 24) index)
     49          (%get-unsigned-byte p 4) (ldb (byte 8 24) (ash discard-stack (- x8632::word-shift)))
    5150          (%get-unsigned-byte p 5) #xff  ; jmp *
    5251          (%get-unsigned-byte p 6) #x24
Note: See TracChangeset for help on using the changeset viewer.