Ignore:
Timestamp:
Jan 19, 2010, 8:28:49 PM (10 years ago)
Author:
rme
Message:

Tweak darwinx8664 stuff to use Leopard interfaces; remove our private
ucontext/mcontext/sigaltstack structure definitions.

File:
1 edited

Legend:

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

    r13397 r13399  
    7979
    8080#+darwinx8664-target
    81 ;;; Apple has decided that compliance with some Unix standard or other
    82 ;;; requires gratuitously renaming ucontext/mcontext structures and
    83 ;;; their components.  Do you feel more compliant now ?
    84 (progn
    85   (eval-when (:compile-toplevel :execute)
    86     (def-foreign-type nil
    87         (:struct :portable_mcontext64
    88                  (:es :x86_exception_state64_t)
    89                  (:ss :x86_thread_state64_t)
    90                  (:fs :x86_float_state64_t)))
    91     (def-foreign-type nil
    92         (:struct :portable_uc_stack
    93                  (:ss_sp (:* :void))
    94                  (:ss_size (:unsigned 64))
    95                  (:ss_flags  (:signed 32))))
    96     (def-foreign-type nil
    97         (:struct :portable_ucontext64
    98                  (:onstack (:signed 32))
    99                  (:sigmask (:unsigned 32))
    100                  (:stack (:struct :portable_uc_stack))
    101                  (:link :address)
    102                  (:uc_mcsize (:unsigned 64))
    103                  (:uc_mcontext64 (:* (:struct :portable_mcontext64))))))
    104   (defun xp-mxcsr (xp)
    105     (%get-unsigned-long
    106      (pref (pref xp :portable_ucontext64.uc_mcontext64) :portable_mcontext64.fs) 32))
    107   (defconstant gp-regs-offset 0)
    108   (defmacro xp-gp-regs (xp)
    109     `(pref (pref ,xp :portable_ucontext64.uc_mcontext64) :portable_mcontext64.ss))
     81(progn
     82  (defconstant gp-regs-offset 0)
     83  (defun xp-mxcsr (xp)
     84     (pref xp :ucontext_t.uc_mcontext.__fs.__fpu_mxcsr))
     85  (defmacro xp-gp-regs (xp)
     86    `(pref ,xp :ucontext_t.uc_mcontext.__ss))
    11087
    11188  (defconstant flags-register-offset 17)
Note: See TracChangeset for help on using the changeset viewer.