1*54579826SDavid Howells /* 2*54579826SDavid Howells * uctx.h: Sparc64 {set,get}context() register state layouts. 3*54579826SDavid Howells * 4*54579826SDavid Howells * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) 5*54579826SDavid Howells */ 6*54579826SDavid Howells 7*54579826SDavid Howells #ifndef __SPARC64_UCTX_H 8*54579826SDavid Howells #define __SPARC64_UCTX_H 9*54579826SDavid Howells 10*54579826SDavid Howells #define MC_TSTATE 0 11*54579826SDavid Howells #define MC_PC 1 12*54579826SDavid Howells #define MC_NPC 2 13*54579826SDavid Howells #define MC_Y 3 14*54579826SDavid Howells #define MC_G1 4 15*54579826SDavid Howells #define MC_G2 5 16*54579826SDavid Howells #define MC_G3 6 17*54579826SDavid Howells #define MC_G4 7 18*54579826SDavid Howells #define MC_G5 8 19*54579826SDavid Howells #define MC_G6 9 20*54579826SDavid Howells #define MC_G7 10 21*54579826SDavid Howells #define MC_O0 11 22*54579826SDavid Howells #define MC_O1 12 23*54579826SDavid Howells #define MC_O2 13 24*54579826SDavid Howells #define MC_O3 14 25*54579826SDavid Howells #define MC_O4 15 26*54579826SDavid Howells #define MC_O5 16 27*54579826SDavid Howells #define MC_O6 17 28*54579826SDavid Howells #define MC_O7 18 29*54579826SDavid Howells #define MC_NGREG 19 30*54579826SDavid Howells 31*54579826SDavid Howells typedef unsigned long mc_greg_t; 32*54579826SDavid Howells typedef mc_greg_t mc_gregset_t[MC_NGREG]; 33*54579826SDavid Howells 34*54579826SDavid Howells #define MC_MAXFPQ 16 35*54579826SDavid Howells struct mc_fq { 36*54579826SDavid Howells unsigned long *mcfq_addr; 37*54579826SDavid Howells unsigned int mcfq_insn; 38*54579826SDavid Howells }; 39*54579826SDavid Howells 40*54579826SDavid Howells struct mc_fpu { 41*54579826SDavid Howells union { 42*54579826SDavid Howells unsigned int sregs[32]; 43*54579826SDavid Howells unsigned long dregs[32]; 44*54579826SDavid Howells long double qregs[16]; 45*54579826SDavid Howells } mcfpu_fregs; 46*54579826SDavid Howells unsigned long mcfpu_fsr; 47*54579826SDavid Howells unsigned long mcfpu_fprs; 48*54579826SDavid Howells unsigned long mcfpu_gsr; 49*54579826SDavid Howells struct mc_fq *mcfpu_fq; 50*54579826SDavid Howells unsigned char mcfpu_qcnt; 51*54579826SDavid Howells unsigned char mcfpu_qentsz; 52*54579826SDavid Howells unsigned char mcfpu_enab; 53*54579826SDavid Howells }; 54*54579826SDavid Howells typedef struct mc_fpu mc_fpu_t; 55*54579826SDavid Howells 56*54579826SDavid Howells typedef struct { 57*54579826SDavid Howells mc_gregset_t mc_gregs; 58*54579826SDavid Howells mc_greg_t mc_fp; 59*54579826SDavid Howells mc_greg_t mc_i7; 60*54579826SDavid Howells mc_fpu_t mc_fpregs; 61*54579826SDavid Howells } mcontext_t; 62*54579826SDavid Howells 63*54579826SDavid Howells struct ucontext { 64*54579826SDavid Howells struct ucontext *uc_link; 65*54579826SDavid Howells unsigned long uc_flags; 66*54579826SDavid Howells sigset_t uc_sigmask; 67*54579826SDavid Howells mcontext_t uc_mcontext; 68*54579826SDavid Howells }; 69*54579826SDavid Howells typedef struct ucontext ucontext_t; 70*54579826SDavid Howells 71*54579826SDavid Howells #endif /* __SPARC64_UCTX_H */ 72