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