Changeset 6527


Ignore:
Timestamp:
May 9, 2007, 9:00:00 AM (15 years ago)
Author:
gb
Message:

New stuff for finding FP state in exception context; new TRA handling.

File:
1 edited

Legend:

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

    r6219 r6527  
    3636#define set_xpGPR(x,gpr,new) xpGPR((x),(gpr)) = (natural)(new)
    3737#define xpPC(x) (xpGPR(x,Iip))
    38 #define xpFPRvector(x) ((natural *)(&(UC_MCONTEXT(x)->__fs.__fpu_stmm0)))
    39 #define xpMMXreg(x,n)  (xpFPRvector(x)[gprno])
     38#define xpFPRvector(x) ((natural *)(&(UC_MCONTEXT(x)->__fs.__fpu_xmm0)))
     39#define xpMMXreg(x,n)  (xpFPRvector(x)[n])
    4040#endif
    4141#include <mach/mach.h>
     
    5656#define xpPC(x) xpGPR(x,Iip)
    5757#define xpMMXreg(x,n) *((natural *)(&(((struct savefpu *)(&(x)->uc_mcontext.mc_fpstate))->sv_fp[n])))
     58#define xpXMMregs(x)(&(((struct savefpu *)(&(x)->uc_mcontext.mc_fpstate))->sv_xmm[0]))
    5859#endif
    5960#endif
     
    151152void setup_sigaltstack(area *);
    152153#endif
     154
     155/* recognizing the function associated with a tagged return address */
     156/* now involves recognizinig an "(lea (@ disp (% rip)) (% rn))" */
     157/* instruction at the tra */
     158
     159#define RECOVER_FN_FROM_RIP_LENGTH 7 /* the instruction is 7 bytes long */
     160#define RECOVER_FN_FROM_RIP_DISP_OFFSET 3 /* displacement word is 3 bytes in */
     161#define RECOVER_FN_FROM_RIP_WORD0 0x8d4c /* 0x4c 0x8d, little-endian */
     162#define RECOVER_FN_FROM_RIP_BYTE2 0x2d  /* third byte of opcode */
Note: See TracChangeset for help on using the changeset viewer.