Changeset 13934


Ignore:
Timestamp:
Jul 7, 2010, 7:36:33 PM (9 years ago)
Author:
rme
Message:

New xpMXCSR(x) macro for accessing MXCSR register as saved in
exception context structurs.

Location:
branches/rme-fpe/lisp-kernel
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • branches/rme-fpe/lisp-kernel/platform-darwinx8632.h

    r13638 r13934  
    5454/* Note that this yields only the lower half of the MMX reg on x8632 */
    5555#define xpMMXreg(x,n) *(natural *)&(xpMMXvector(x)[n])
    56 
     56#define xpMXCSR(x) (UC_MCONTEXT(x)->__fs.__fpu_mxcsr)
    5757#define SIGNUM_FOR_INTN_TRAP SIGSEGV /* Not really, but our Mach handler fakes that */
    5858#define IS_MAYBE_INT_TRAP(info,xp) ((UC_MCONTEXT(xp)->__es.__trapno == 0xd) && (((UC_MCONTEXT(xp)->__es.__err)&7)==2))
  • branches/rme-fpe/lisp-kernel/platform-darwinx8664.h

    r13638 r13934  
    5454/* Note that this yields only the lower half of the MMX reg on x8632 */
    5555#define xpMMXreg(x,n) *(natural *)&(xpMMXvector(x)[n])
     56#define xpMXCSR(x) (UC_MCONTEXT(x)->__fs.__fpu_mxcsr)
    5657#define SIGNUM_FOR_INTN_TRAP SIGSEGV /* Not really, but our Mach handler fakes that */
    5758#define IS_MAYBE_INT_TRAP(info,xp) ((UC_MCONTEXT(xp)->__es.__trapno == 0xd) && (((UC_MCONTEXT(xp)->__es.__err)&7)==2))
  • branches/rme-fpe/lisp-kernel/platform-freebsdx8632.h

    r13640 r13934  
    4040#define xpMMXreg(x,n) *((natural *)(&(((struct ccl_savexmm *)(&(x)->uc_mcontext.mc_fpstate))->sv_fp[n])))
    4141#define xpXMMregs(x)(&(((struct ccl_savexmm *)(&(x)->uc_mcontext.mc_fpstate))->sv_xmm[0]))
     42#define xpMXCSR(x) ((struct savefpu *)((x)->uc_mcontext.mc_fpstate)->sv_env.en_mxcsr)
    4243extern void freebsd_sigreturn(ExceptionInformation *);
    4344#define SIGNUM_FOR_INTN_TRAP SIGBUS
  • branches/rme-fpe/lisp-kernel/platform-freebsdx8664.h

    r13638 r13934  
    3939#define xpMMXreg(x,n) *((natural *)(&(((struct savefpu *)(&(x)->uc_mcontext.mc_fpstate))->sv_fp[n])))
    4040#define xpXMMregs(x)(&(((struct savefpu *)(&(x)->uc_mcontext.mc_fpstate))->sv_xmm[0]))
     41#define xpMXCSR(x) ((struct savefpu *)((x)->uc_mcontext.mc_fpstate)->sv_env.en_mxcsr)
    4142extern void freebsd_sigreturn(ExceptionInformation *);
    4243#define SIGNUM_FOR_INTN_TRAP SIGBUS
  • branches/rme-fpe/lisp-kernel/platform-linuxx8632.h

    r13638 r13934  
    3838#define xpPC(x) (xpGPR(x,Iip))
    3939#define xpMMXreg(x,n)  *((natural *)(&((x)->uc_mcontext.fpregs->_st[n])))
     40#define xpMXCSR(xp) ((xp)->uc_mcontext.fpregs->mxcsr)
    4041#define eflags_register(xp) xpGPR(xp,Iflags)
    4142#define SIGNUM_FOR_INTN_TRAP SIGSEGV
  • branches/rme-fpe/lisp-kernel/platform-linuxx8664.h

    r13638 r13934  
    3737#define xpPC(x) (xpGPR(x,Iip))
    3838#define xpMMXreg(x,n)  *((natural *)(&((x)->uc_mcontext.fpregs->_st[n])))
     39#define xpMXCSR(xp) ((xp)->uc_mcontext.fpregs->mxcsr)
    3940#define eflags_register(xp) xpGPR(xp,Iflags)
    4041#define SIGNUM_FOR_INTN_TRAP SIGSEGV
  • branches/rme-fpe/lisp-kernel/platform-solarisx64.h

    r13638 r13934  
    3737#define eflags_register(xp) xpGPR(xp,Iflags)
    3838#define xpXMMregs(x)(&((x)->uc_mcontext.fpregs.fp_reg_set.fpchip_state.xmm[0]))
     39#define xmMXCSR(x) ((x)->uc_mcontext.fpregs.fp_reg_set.fpchip_state.xstatus)
    3940#define SIGNUM_FOR_INTN_TRAP SIGSEGV
    4041#ifdef X8664
  • branches/rme-fpe/lisp-kernel/platform-solarisx86.h

    r13638 r13934  
    3838#define xpXMMregs(x)(&((x)->uc_mcontext.fpregs.fp_reg_set.fpchip_state.xmm[0]))
    3939#define xpMMXreg(x,n)*(natural *)(&(((struct fnsave_state *)(&(((x)->uc_mcontext.fpregs))))->f_st[n]))
     40#define xmMXCSR(x) ((x)->uc_mcontext.fpregs.fp_reg_set.fpchip_state.xstatus)
    4041#define SIGNUM_FOR_INTN_TRAP SIGSEGV
    4142#ifdef X8664
  • branches/rme-fpe/lisp-kernel/platform-win32.h

    r13642 r13934  
    3939#define xpFPRvector(x) ((natural *)(&(x->ExtendedRegisters[10*16])))
    4040#define xpMMXreg(x,n)  (*((u64_t *)(&(x->FloatSave.RegisterArea[10*(n)]))))
    41 #define xpMXCSRptr(x) (DWORD *)(&(x->ExtendedRegisters[24]))
     41#define xpMXCSRptr(x) ((DWORD *)(&(x->ExtendedRegisters[24])))
     42#define xpMXCSR(x) (*xpMXCSRptr(x))
    4243
    4344#define SIGNUM_FOR_INTN_TRAP SIGSEGV /* Also fake */
  • branches/rme-fpe/lisp-kernel/platform-win64.h

    r13641 r13934  
    3939#define eflags_register(xp) xp->EFlags
    4040#define xpMXCSRptr(x) (DWORD *)(&(x->MxCsr))
    41 
     41#define xpMXCSR(x) ((x)->MxCsr)
    4242
    4343#define SIGNUM_FOR_INTN_TRAP SIGSEGV /* Also fake */
Note: See TracChangeset for help on using the changeset viewer.