Changeset 8811


Ignore:
Timestamp:
Mar 17, 2008, 7:20:01 AM (12 years ago)
Author:
gb
Message:

define eflags_register() for all platforms.
change xpGPR etc for win64.
Define Win64 signal stuff.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/win64/lisp-kernel/x86-exceptions.h

    r8581 r8811  
    2424#define xpPC(x) (xpGPR(x,Iip))
    2525#define xpMMXreg(x,n)  *((natural *)(&((x)->uc_mcontext.fpregs->_st[n])))
     26#define eflags_register(xp) xpGPR(xp,Iflags)
    2627#endif
    2728#endif
     
    3637#define set_xpGPR(x,gpr,new) xpGPR((x),(gpr)) = (natural)(new)
    3738#define xpPC(x) (xpGPR(x,Iip))
     39#define eflags_register(xp) xpGPR(xp,Iflags)
    3840#define xpFPRvector(x) ((natural *)(&(UC_MCONTEXT(x)->__fs.__fpu_xmm0)))
    3941#define xpMMXreg(x,n)  (xpFPRvector(x)[n])
     
    5456#define xpGPR(x,gprno) (xpGPRvector(x)[gprno])
    5557#define set_xpGPR(x,gpr,new) xpGPR((x),(gpr)) = (natural)(new)
     58#define eflags_register(xp) xpGPR(xp,Iflags)
    5659#define xpPC(x) xpGPR(x,Iip)
    5760#define xpMMXreg(x,n) *((natural *)(&(((struct savefpu *)(&(x)->uc_mcontext.mc_fpstate))->sv_fp[n])))
     
    6669#define set_xpGPR(x,gpr,new) xpGPR((x),(gpr)) = (natural)(new)
    6770#define xpPC(x) xpGPR(x,Iip)
     71#define eflags_register(xp) xpGPR(xp,Iflags)
    6872#define xpMMXreg(x,n)  *((natural *)(&(x)->uc_mcontext.fpregs.fp_reg_set.fpchip_state.st[n]))
    6973#endif
     
    7175
    7276#ifdef WIN64
    73 #define xpGPRvector(x) ((DWORD64 *)((x)->ContextRecord))
     77#define xpGPRvector(x) ((DWORD64 *)(&(x)->Rax))
    7478#define xpGPR(x,gprno) (xpGPRvector(x)[gprno])
    7579#define xpPC(x) xpGPR(x,Iip)
     80#define eflags_register(xp) xp->EFlags
    7681#endif
    7782
     
    8792#ifdef SOLARIS
    8893#define SIGNAL_FOR_PROCESS_INTERRUPT SIGEMT
     94#endif
     95#ifdef WINDOWS
     96#define SIGNAL_FOR_PROCESS_INTERRUPT SIGINT
    8997#endif
    9098
     
    146154#endif
    147155
     156#ifdef WINDOWS
     157#define SIGNUM_FOR_INTN_TRAP SIGSEGV /* Also fake */
     158#define IS_MAYBE_INT_TRAP(info,xp) \
     159  ((info->ExceptionCode == EXCEPTION_ACCESS_VIOLATION) &&       \
     160   (info->ExceptionInformation[0]==0) &&                       \
     161   (info->ExceptionInformation[1]==(ULONG_PTR)(-1L)))
     162#define SIGRETURN(context)      /* for now */
     163#endif
     164
    148165/* Please go away. */
    149166#ifdef DARWIN_GS_HACK
Note: See TracChangeset for help on using the changeset viewer.