Changeset 9410


Ignore:
Timestamp:
May 9, 2008, 3:32:30 AM (11 years ago)
Author:
rme
Message:

Use ucontext/mcontext structures defined in interface database instead
of defining foreign-types ourselves.

(The usual names are still around on 32-bit Darwin, but things have
been "cleaned up" on 64-bit Darwin.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ia32/level-1/x86-trap-support.lisp

    r9406 r9410  
    132132#+darwinx8632-target
    133133(progn
    134   (eval-when (:compile-toplevel :execute)
    135     (def-foreign-type nil
    136         (:struct :portable_mcontext
    137                  (:es :x86_exception_state32_t)
    138                  (:ss :x86_thread_state32_t)
    139                  (:fs :x86_float_state32_t)))
    140     (def-foreign-type nil
    141         (:struct :portable_uc_stack
    142                  (:ss_sp (:* :void))
    143                  (:ss_size (:unsigned 32))
    144                  (:ss_flags  (:signed 32))))
    145     (def-foreign-type nil
    146         (:struct :portable_ucontext
    147                  (:onstack (:signed 32))
    148                  (:sigmask (:unsigned 32))
    149                  (:stack (:struct :portable_uc_stack))
    150                  (:link :address)
    151                  (:uc_mcsize (:unsigned 32))
    152                  (:uc_mcontext (:* (:struct :portable_mcontext))))))
    153 
    154134  (defconstant gp-regs-offset 0)
    155 
    156   ;;; xxx pick: use types from interface db, or correct "portable" ones
    157135  (defmacro xp-gp-regs (xp)
    158     `(pref (pref ,xp :ucontext_t.uc_mcontext) :portable_mcontext.ss))
    159 
     136    `(pref (pref ,xp :ucontext.uc_mcontext) :mcontext.ss))
     137  (defun xp-mxcsr (xp)
     138    (%get-unsigned-long (pref (pref xp :ucontext.uc_mcontext) :mcontext.fs) 32))
    160139  (defconstant flags-register-offset 9)
    161140  (defconstant eip-register-offset 10)
Note: See TracChangeset for help on using the changeset viewer.