Ignore:
Timestamp:
Jul 19, 2008, 5:01:57 AM (11 years ago)
Author:
rme
Message:

MAKE-CALLBACK-TRAMPOLINE for x8632.

File:
1 edited

Legend:

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

    r6948 r10132  
    1818
    1919
    20  
     20#+x8664-target 
    2121(defun make-callback-trampoline (index &optional monitor-exception-ports)
    2222  (declare (ignorable monitor-exception-ports))
     
    3939    p))
    4040         
     41#+x8632-target         
     42(defun make-callback-trampoline (index &optional monitor-exception-ports)
     43  (declare (ignorable monitor-exception-ports))
     44  (let* ((p (%allocate-callback-pointer 12))
     45         (addr #.(subprim-name->offset '.SPcallback)))
     46    (setf (%get-unsigned-byte p 0) #xb8 ; movl $n,%eax
     47          (%get-unsigned-byte p 1) (ldb (byte 8 0) index)
     48          (%get-unsigned-byte p 2) (ldb (byte 8 8) index)
     49          (%get-unsigned-byte p 3) (ldb (byte 8 16) index)
     50          (%get-unsigned-byte p 4) (ldb (byte 8 24) index)
     51          (%get-unsigned-byte p 5) #xff  ; jmp *
     52          (%get-unsigned-byte p 6) #x24
     53          (%get-unsigned-byte p 7) #x25
     54          (%get-unsigned-byte p 8) (ldb (byte 8 0) addr)
     55          (%get-unsigned-byte p 9) (ldb (byte 8 8) addr)
     56          (%get-unsigned-byte p 10) (ldb (byte 8 16) addr)
     57          (%get-unsigned-byte p 11) (ldb (byte 8 24) addr))
     58    p))
    4159 
Note: See TracChangeset for help on using the changeset viewer.