Changeset 10804


Ignore:
Timestamp:
Sep 18, 2008, 2:46:32 AM (11 years ago)
Author:
rme
Message:

x86 Darwin xp accessors are now insensitive to word size.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/x86-exceptions.h

    r10803 r10804  
    3333#include <sys/syscall.h>
    3434#define DarwinSigReturn(context) syscall(0x2000000|SYS_sigreturn,context,0x1e)
    35 #ifdef X8664
    36 #define xpGPRvector(x) ((natural *)(&(UC_MCONTEXT(x)->__ss.__rax)))
     35#define xpGPRvector(x) ((natural *)(&(UC_MCONTEXT(x)->__ss)))
    3736#define xpGPR(x,gprno) (xpGPRvector(x)[gprno])
    3837#define set_xpGPR(x,gpr,new) xpGPR((x),(gpr)) = (natural)(new)
     
    4039#define eflags_register(xp) xpGPR(xp,Iflags)
    4140#define xpFPRvector(x) ((natural *)(&(UC_MCONTEXT(x)->__fs.__fpu_xmm0)))
    42 #define xpMMXreg(x,n) ((natural *)(&(x)->uc_mcontext->__fs.__fpu_stmm0))[n]
    43 #else /* X8632 */
    44 #define xpGPRvector(x) ((natural *)(&((x)->uc_mcontext->__ss.__eax)))
    45 #define xpGPR(x,gprno) (xpGPRvector(x)[gprno])
    46 #define set_xpGPR(x,gpr,new) xpGPR((x),(gpr)) = (natural)(new)
    47 #define xpPC(x) (xpGPR(x,Iip))
    48 #define eflags_register(xp) xpGPR(xp,Iflags)
    49 #define xpFPRvector(x) ((natural *)(&((x)->uc_mcontext->__fs.__fpu_xmm0)))
    50 #define xpMMXreg(x,n) ((natural *)(&(x)->uc_mcontext->__fs.__fpu_stmm0))[n]
    51 #endif
     41#define xpMMXreg(x,n) ((natural *)(&(UC_MCONTEXT(x)->__fs.__fpu_stmm0)))[n]
     42
    5243#include <mach/mach.h>
    5344#include <mach/mach_error.h>
Note: See TracChangeset for help on using the changeset viewer.