diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/sparc/sys')
-rw-r--r-- | sysdeps/unix/sysv/linux/sparc/sys/procfs.h | 210 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/sparc/sys/ptrace.h | 281 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/sparc/sys/trap.h | 7 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/sparc/sys/ucontext.h | 274 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/sparc/sys/user.h | 86 |
5 files changed, 0 insertions, 858 deletions
diff --git a/sysdeps/unix/sysv/linux/sparc/sys/procfs.h b/sysdeps/unix/sysv/linux/sparc/sys/procfs.h deleted file mode 100644 index e41331ac7c..0000000000 --- a/sysdeps/unix/sysv/linux/sparc/sys/procfs.h +++ /dev/null @@ -1,210 +0,0 @@ -/* Copyright (C) 1996-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#ifndef _SYS_PROCFS_H -#define _SYS_PROCFS_H 1 - -/* This is somehow modelled after the file of the same name on SysVr4 - systems. It provides a definition of the core file format for ELF - used on Linux. */ - -#include <features.h> -#include <signal.h> -#include <sys/time.h> -#include <sys/types.h> -#include <sys/ucontext.h> -#include <sys/user.h> -#include <bits/wordsize.h> - -__BEGIN_DECLS - -#if __WORDSIZE == 64 - -#define ELF_NGREG 36 - -typedef struct - { - unsigned long pr_regs[32]; - unsigned long pr_fsr; - unsigned long pr_gsr; - unsigned long pr_fprs; - } elf_fpregset_t; - -#else /* sparc32 */ - -#define ELF_NGREG 38 - -typedef struct - { - union - { - unsigned long pr_regs[32]; - double pr_dregs[16]; - } pr_fr; - unsigned long __glibc_reserved; - unsigned long pr_fsr; - unsigned char pr_qcnt; - unsigned char pr_q_entrysize; - unsigned char pr_en; - unsigned int pr_q[64]; - } elf_fpregset_t; - -#endif /* sparc32 */ - -typedef unsigned long elf_greg_t; -typedef elf_greg_t elf_gregset_t[ELF_NGREG]; - -struct elf_siginfo - { - int si_signo; /* Signal number. */ - int si_code; /* Extra code. */ - int si_errno; /* Errno. */ - }; - -/* Definitions to generate Intel SVR4-like core files. These mostly - have the same names as the SVR4 types with "elf_" tacked on the - front to prevent clashes with linux definitions, and the typedef - forms have been avoided. This is mostly like the SVR4 structure, - but more Linuxy, with things that Linux does not support and which - gdb doesn't really use excluded. Fields present but not used are - marked with "XXX". */ -struct elf_prstatus - { - struct elf_siginfo pr_info; /* Info associated with signal. */ - short int pr_cursig; /* Current signal. */ - unsigned long int pr_sigpend; /* Set of pending signals. */ - unsigned long int pr_sighold; /* Set of held signals. */ - __pid_t pr_pid; - __pid_t pr_ppid; - __pid_t pr_pgrp; - __pid_t pr_sid; - struct timeval pr_utime; /* User time. */ - struct timeval pr_stime; /* System time. */ - struct timeval pr_cutime; /* Cumulative user time. */ - struct timeval pr_cstime; /* Cumulative system time. */ - elf_gregset_t pr_reg; /* GP registers. */ - int pr_fpvalid; /* True if math copro being used. */ - }; - - -#define ELF_PRARGSZ (80) /* Number of chars for args */ - -struct elf_prpsinfo - { - char pr_state; /* Numeric process state. */ - char pr_sname; /* Char for pr_state. */ - char pr_zomb; /* Zombie. */ - char pr_nice; /* Nice val. */ - unsigned long int pr_flag; /* Flags. */ -#if __WORDSIZE == 64 - unsigned int pr_uid; - unsigned int pr_gid; -#else - unsigned short int pr_uid; - unsigned short int pr_gid; -#endif - int pr_pid, pr_ppid, pr_pgrp, pr_sid; - /* Lots missing */ - char pr_fname[16]; /* Filename of executable. */ - char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ - }; - -/* Addresses. */ -typedef void *psaddr_t; - -/* Register sets. Linux has different names. */ -typedef elf_gregset_t prgregset_t; -typedef elf_fpregset_t prfpregset_t; - -/* We don't have any differences between processes and threads, - therefore have only one PID type. */ -typedef __pid_t lwpid_t; - - -typedef struct elf_prstatus prstatus_t; -typedef struct elf_prpsinfo prpsinfo_t; - -#if __WORDSIZE == 64 - -/* Provide 32-bit variants so that BFD can read 32-bit - core files. */ -#define ELF_NGREG32 38 -typedef struct - { - union - { - unsigned int pr_regs[32]; - double pr_dregs[16]; - } pr_fr; - unsigned int __glibc_reserved; - unsigned int pr_fsr; - unsigned char pr_qcnt; - unsigned char pr_q_entrysize; - unsigned char pr_en; - unsigned int pr_q[64]; - } elf_fpregset_t32; - -typedef unsigned int elf_greg_t32; -typedef elf_greg_t32 elf_gregset_t32[ELF_NGREG32]; - -struct elf_prstatus32 - { - struct elf_siginfo pr_info; /* Info associated with signal. */ - short int pr_cursig; /* Current signal. */ - unsigned int pr_sigpend; /* Set of pending signals. */ - unsigned int pr_sighold; /* Set of held signals. */ - __pid_t pr_pid; - __pid_t pr_ppid; - __pid_t pr_pgrp; - __pid_t pr_sid; - struct - { - int tv_sec, tv_usec; - } pr_utime, /* User time. */ - pr_stime, /* System time. */ - pr_cutime, /* Cumulative user time. */ - pr_cstime; /* Cumulative system time. */ - elf_gregset_t32 pr_reg; /* GP registers. */ - int pr_fpvalid; /* True if math copro being used. */ - }; - -struct elf_prpsinfo32 - { - char pr_state; /* Numeric process state. */ - char pr_sname; /* Char for pr_state. */ - char pr_zomb; /* Zombie. */ - char pr_nice; /* Nice val. */ - unsigned int pr_flag; /* Flags. */ - unsigned short int pr_uid; - unsigned short int pr_gid; - int pr_pid, pr_ppid, pr_pgrp, pr_sid; - /* Lots missing */ - char pr_fname[16]; /* Filename of executable. */ - char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */ - }; - -typedef elf_gregset_t32 prgregset32_t; -typedef elf_fpregset_t32 prfpregset32_t; - -typedef struct elf_prstatus32 prstatus32_t; -typedef struct elf_prpsinfo32 prpsinfo32_t; - -#endif /* sparc64 */ - -__END_DECLS - -#endif /* sys/procfs.h */ diff --git a/sysdeps/unix/sysv/linux/sparc/sys/ptrace.h b/sysdeps/unix/sysv/linux/sparc/sys/ptrace.h deleted file mode 100644 index f60549427f..0000000000 --- a/sysdeps/unix/sysv/linux/sparc/sys/ptrace.h +++ /dev/null @@ -1,281 +0,0 @@ -/* `ptrace' debugger support interface. Linux/SPARC version. - Copyright (C) 1996-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#ifndef _SYS_PTRACE_H -#define _SYS_PTRACE_H 1 - -#include <features.h> -#include <bits/types.h> -#include <bits/wordsize.h> - -/* Linux/SPARC kernels up to 2.3.18 do not care much - about what namespace polution, so use a kludge now. */ -#undef PTRACE_GETREGS -#undef PTRACE_SETREGS -#undef PTRACE_GETFPREGS -#undef PTRACE_SETFPREGS -#undef PTRACE_READDATA -#undef PTRACE_WRITEDATA -#undef PTRACE_READTEXT -#undef PTRACE_WRITETEXT -#undef PTRACE_SUNDETACH - -__BEGIN_DECLS - -/* Type of the REQUEST argument to `ptrace.' */ -enum __ptrace_request -{ - /* Indicate that the process making this request should be traced. - All signals received by this process can be intercepted by its - parent, and its parent can use the other `ptrace' requests. */ - PTRACE_TRACEME = 0, -#define PT_TRACE_ME PTRACE_TRACEME - - /* Return the word in the process's text space at address ADDR. */ - PTRACE_PEEKTEXT = 1, -#define PT_READ_I PTRACE_PEEKTEXT - - /* Return the word in the process's data space at address ADDR. */ - PTRACE_PEEKDATA = 2, -#define PT_READ_D PTRACE_PEEKDATA - - /* Return the word in the process's user area at offset ADDR. */ - PTRACE_PEEKUSER = 3, -#define PT_READ_U PTRACE_PEEKUSER - - /* Write the word DATA into the process's text space at address ADDR. */ - PTRACE_POKETEXT = 4, -#define PT_WRITE_I PTRACE_POKETEXT - - /* Write the word DATA into the process's data space at address ADDR. */ - PTRACE_POKEDATA = 5, -#define PT_WRITE_D PTRACE_POKEDATA - - /* Write the word DATA into the process's user area at offset ADDR. */ - PTRACE_POKEUSER = 6, -#define PT_WRITE_U PTRACE_POKEUSER - - /* Continue the process. */ - PTRACE_CONT = 7, -#define PT_CONTINUE PTRACE_CONT - - /* Kill the process. */ - PTRACE_KILL = 8, -#define PT_KILL PTRACE_KILL - - /* Single step the process. - This is not supported on all machines. */ - PTRACE_SINGLESTEP = 9, -#define PT_STEP PTRACE_SINGLESTEP - - /* Detach from a process attached to with PTRACE_ATTACH. */ - PTRACE_DETACH = 11, -#define PT_DETACH PTRACE_DETACH - - /* This define is needed for older programs which were - trying to work around sparc-linux ptrace nastiness. */ -#define PTRACE_SUNDETACH PTRACE_DETACH - -#if __WORDSIZE == 32 - - /* Get all general purpose registers used by a processes. - This is not supported on all machines. */ - PTRACE_GETREGS = 12, -#define PT_GETREGS PTRACE_GETREGS - - /* Set all general purpose registers used by a processes. - This is not supported on all machines. */ - PTRACE_SETREGS = 13, -#define PT_SETREGS PTRACE_SETREGS - - /* Get all floating point registers used by a processes. - This is not supported on all machines. */ - PTRACE_GETFPREGS = 14, -#define PT_GETFPREGS PTRACE_GETFPREGS - - /* Set all floating point registers used by a processes. - This is not supported on all machines. */ - PTRACE_SETFPREGS = 15, -#define PT_SETFPREGS PTRACE_SETFPREGS - -#endif - - /* Attach to a process that is already running. */ - PTRACE_ATTACH = 16, -#define PT_ATTACH PTRACE_ATTACH - - /* Write several bytes at a time. */ - PTRACE_WRITEDATA = 17, -#define PTRACE_WRITEDATA PTRACE_WRITEDATA - - /* Read several bytes at a time. */ - PTRACE_READTEXT = 18, -#define PTRACE_READTEXT PTRACE_READTEXT -#define PTRACE_READDATA PTRACE_READTEXT - - /* Write several bytes at a time. */ - PTRACE_WRITETEXT = 19, -#define PTRACE_WRITETEXT PTRACE_WRITETEXT - -#if __WORDSIZE == 64 - - /* Get all general purpose registers used by a processes. - This is not supported on all machines. */ - PTRACE_GETREGS = 22, -#define PT_GETREGS PTRACE_GETREGS - - /* Set all general purpose registers used by a processes. - This is not supported on all machines. */ - PTRACE_SETREGS = 23, -#define PT_SETREGS PTRACE_SETREGS - -#endif - - /* Continue and stop at the next (return from) syscall. */ - PTRACE_SYSCALL = 24, -#define PTRACE_SYSCALL PTRACE_SYSCALL - -#if __WORDSIZE == 64 - - /* Get all floating point registers used by a processes. - This is not supported on all machines. */ - PTRACE_GETFPREGS = 25, -#define PT_GETFPREGS PTRACE_GETFPREGS - - /* Set all floating point registers used by a processes. - This is not supported on all machines. */ - PTRACE_SETFPREGS = 26, -#define PT_SETFPREGS PTRACE_SETFPREGS - -#endif - - /* Set ptrace filter options. */ - PTRACE_SETOPTIONS = 0x4200, -#define PT_SETOPTIONS PTRACE_SETOPTIONS - - /* Get last ptrace message. */ - PTRACE_GETEVENTMSG = 0x4201, -#define PT_GETEVENTMSG PTRACE_GETEVENTMSG - - /* Get siginfo for process. */ - PTRACE_GETSIGINFO = 0x4202, -#define PT_GETSIGINFO PTRACE_GETSIGINFO - - /* Set new siginfo for process. */ - PTRACE_SETSIGINFO = 0x4203, -#define PT_SETSIGINFO PTRACE_SETSIGINFO - - /* Get register content. */ - PTRACE_GETREGSET = 0x4204, -#define PTRACE_GETREGSET PTRACE_GETREGSET - - /* Set register content. */ - PTRACE_SETREGSET = 0x4205, -#define PTRACE_SETREGSET PTRACE_SETREGSET - - /* Like PTRACE_ATTACH, but do not force tracee to trap and do not affect - signal or group stop state. */ - PTRACE_SEIZE = 0x4206, -#define PTRACE_SEIZE PTRACE_SEIZE - - /* Trap seized tracee. */ - PTRACE_INTERRUPT = 0x4207, -#define PTRACE_INTERRUPT PTRACE_INTERRUPT - - /* Wait for next group event. */ - PTRACE_LISTEN = 0x4208, -#define PTRACE_LISTEN PTRACE_LISTEN - - PTRACE_PEEKSIGINFO = 0x4209, -#define PTRACE_PEEKSIGINFO PTRACE_PEEKSIGINFO - - PTRACE_GETSIGMASK = 0x420a, -#define PTRACE_GETSIGMASK PTRACE_GETSIGMASK - - PTRACE_SETSIGMASK = 0x420b, -#define PTRACE_SETSIGMASK PTRACE_SETSIGMASK - - PTRACE_SECCOMP_GET_FILTER = 0x420c -#define PTRACE_SECCOMP_GET_FILTER PTRACE_SECCOMP_GET_FILTER -}; - - -/* Flag for PTRACE_LISTEN. */ -enum __ptrace_flags -{ - PTRACE_SEIZE_DEVEL = 0x80000000 -}; - -/* Options set using PTRACE_SETOPTIONS. */ -enum __ptrace_setoptions -{ - PTRACE_O_TRACESYSGOOD = 0x00000001, - PTRACE_O_TRACEFORK = 0x00000002, - PTRACE_O_TRACEVFORK = 0x00000004, - PTRACE_O_TRACECLONE = 0x00000008, - PTRACE_O_TRACEEXEC = 0x00000010, - PTRACE_O_TRACEVFORKDONE = 0x00000020, - PTRACE_O_TRACEEXIT = 0x00000040, - PTRACE_O_TRACESECCOMP = 0x00000080, - PTRACE_O_EXITKILL = 0x00100000, - PTRACE_O_SUSPEND_SECCOMP = 0x00200000, - PTRACE_O_MASK = 0x003000ff -}; - -enum __ptrace_eventcodes -{ -/* Wait extended result codes for the above trace options. */ - PTRACE_EVENT_FORK = 1, - PTRACE_EVENT_VFORK = 2, - PTRACE_EVENT_CLONE = 3, - PTRACE_EVENT_EXEC = 4, - PTRACE_EVENT_VFORK_DONE = 5, - PTRACE_EVENT_EXIT = 6, - PTRACE_EVENT_SECCOMP = 7, -/* Extended result codes enabled by means other than options. */ - PTRACE_EVENT_STOP = 128 -}; - -/* Arguments for PTRACE_PEEKSIGINFO. */ -struct __ptrace_peeksiginfo_args -{ - __uint64_t off; /* From which siginfo to start. */ - __uint32_t flags; /* Flags for peeksiginfo. */ - __int32_t nr; /* How many siginfos to take. */ -}; - -enum __ptrace_peeksiginfo_flags -{ - /* Read signals from a shared (process wide) queue. */ - PTRACE_PEEKSIGINFO_SHARED = (1 << 0) -}; - -/* Perform process tracing functions. REQUEST is one of the values - above, and determines the action to be taken. - For all requests except PTRACE_TRACEME, PID specifies the process to be - traced. - - PID and the other arguments described above for the various requests should - appear (those that are used for the particular request) as: - pid_t PID, void *ADDR, int DATA, void *ADDR2 - after REQUEST. */ -extern long int ptrace (enum __ptrace_request __request, ...) __THROW; - -__END_DECLS - -#endif /* _SYS_PTRACE_H */ diff --git a/sysdeps/unix/sysv/linux/sparc/sys/trap.h b/sysdeps/unix/sysv/linux/sparc/sys/trap.h deleted file mode 100644 index 99b9c60e06..0000000000 --- a/sysdeps/unix/sysv/linux/sparc/sys/trap.h +++ /dev/null @@ -1,7 +0,0 @@ -/* Include Linux/SPARC specific trap definitions. */ -#ifndef _SYS_TRAP_H -#define _SYS_TRAP_H 1 - -#include <asm/traps.h> - -#endif /* sys/trap.h */ diff --git a/sysdeps/unix/sysv/linux/sparc/sys/ucontext.h b/sysdeps/unix/sysv/linux/sparc/sys/ucontext.h deleted file mode 100644 index 7ce5f2b881..0000000000 --- a/sysdeps/unix/sysv/linux/sparc/sys/ucontext.h +++ /dev/null @@ -1,274 +0,0 @@ -/* Copyright (C) 1998-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#ifndef _SYS_UCONTEXT_H -#define _SYS_UCONTEXT_H 1 - -#include <features.h> - -#include <bits/types/sigset_t.h> -#include <bits/sigcontext.h> -#include <bits/types/stack_t.h> - -#include <bits/wordsize.h> - - -#if __WORDSIZE == 64 - -#define MC_TSTATE 0 -#define MC_PC 1 -#define MC_NPC 2 -#define MC_Y 3 -#define MC_G1 4 -#define MC_G2 5 -#define MC_G3 6 -#define MC_G4 7 -#define MC_G5 8 -#define MC_G6 9 -#define MC_G7 10 -#define MC_O0 11 -#define MC_O1 12 -#define MC_O2 13 -#define MC_O3 14 -#define MC_O4 15 -#define MC_O5 16 -#define MC_O6 17 -#define MC_O7 18 -#define MC_NGREG 19 - -typedef unsigned long mc_greg_t; -typedef mc_greg_t mc_gregset_t[MC_NGREG]; - -#define MC_MAXFPQ 16 -struct mc_fq { - unsigned long *mcfq_addr; - unsigned int mcfq_insn; -}; - -struct mc_fpu { - union { - unsigned int sregs[32]; - unsigned long dregs[32]; - long double qregs[16]; - } mcfpu_fregs; - unsigned long mcfpu_fsr; - unsigned long mcfpu_fprs; - unsigned long mcfpu_gsr; - struct mc_fq *mcfpu_fq; - unsigned char mcfpu_qcnt; - unsigned char mcfpu_qentsz; - unsigned char mcfpu_enab; -}; -typedef struct mc_fpu mc_fpu_t; - -typedef struct { - mc_gregset_t mc_gregs; - mc_greg_t mc_fp; - mc_greg_t mc_i7; - mc_fpu_t mc_fpregs; -} mcontext_t; - -typedef struct ucontext { - struct ucontext *uc_link; - unsigned long uc_flags; - unsigned long __uc_sigmask; - mcontext_t uc_mcontext; - stack_t uc_stack; - sigset_t uc_sigmask; -} ucontext_t; - -#endif /* __WORDISIZE == 64 */ - -/* - * Location of the users' stored registers relative to R0. - * Usage is as an index into a gregset_t array or as u.u_ar0[XX]. - */ -#define REG_PSR (0) -#define REG_PC (1) -#define REG_nPC (2) -#define REG_Y (3) -#define REG_G1 (4) -#define REG_G2 (5) -#define REG_G3 (6) -#define REG_G4 (7) -#define REG_G5 (8) -#define REG_G6 (9) -#define REG_G7 (10) -#define REG_O0 (11) -#define REG_O1 (12) -#define REG_O2 (13) -#define REG_O3 (14) -#define REG_O4 (15) -#define REG_O5 (16) -#define REG_O6 (17) -#define REG_O7 (18) - -/* - * A gregset_t is defined as an array type for compatibility with the reference - * source. This is important due to differences in the way the C language - * treats arrays and structures as parameters. - * - * Note that NGREG is really (sizeof (struct regs) / sizeof (greg_t)), - * but that the ABI defines it absolutely to be 21 (resp. 19). - */ - -#if __WORDSIZE == 64 - -#define REG_ASI (19) -#define REG_FPRS (20) - -#define NGREG 21 -typedef long greg_t; - -#else /* __WORDSIZE == 32 */ - -#define NGREG 19 -typedef int greg_t; - -#endif /* __WORDSIZE == 32 */ - -typedef greg_t gregset_t[NGREG]; - -/* - * The following structures define how a register window can appear on the - * stack. This structure is available (when required) through the `gwins' - * field of an mcontext (nested within ucontext). SPARC_MAXWINDOW is the - * maximum number of outstanding regiters window defined in the SPARC - * architecture (*not* implementation). - */ -#define SPARC_MAXREGWINDOW 31 /* max windows in SPARC arch. */ -struct rwindow - { - greg_t rw_local[8]; /* locals */ - greg_t rw_in[8]; /* ins */ - }; - -#define rw_fp rw_in[6] /* frame pointer */ -#define rw_rtn rw_in[7] /* return address */ - -typedef struct gwindows - { - int wbcnt; - int *spbuf[SPARC_MAXREGWINDOW]; - struct rwindow wbuf[SPARC_MAXREGWINDOW]; - } gwindows_t; - -/* - * Floating point definitions. - */ - -#define MAXFPQ 16 /* max # of fpu queue entries currently supported */ - -/* - * struct fq defines the minimal format of a floating point instruction queue - * entry. The size of entries in the floating point queue are implementation - * dependent. The union FQu is guarenteed to be the first field in any ABI - * conformant system implementation. Any additional fields provided by an - * implementation should not be used applications designed to be ABI conformant. */ - -struct fpq - { - unsigned long *fpq_addr; /* address */ - unsigned long fpq_instr; /* instruction */ - }; - -struct fq - { - union /* FPU inst/addr queue */ - { - double whole; - struct fpq fpq; - } FQu; - }; - -#define FPU_REGS_TYPE unsigned -#define FPU_DREGS_TYPE unsigned long long -#define V7_FPU_FSR_TYPE unsigned -#define V9_FPU_FSR_TYPE unsigned long long -#define V9_FPU_FPRS_TYPE unsigned - -#if __WORDSIZE == 64 - -typedef struct fpu - { - union { /* FPU floating point regs */ - unsigned fpu_regs[32]; /* 32 singles */ - double fpu_dregs[32]; /* 32 doubles */ - long double fpu_qregs[16]; /* 16 quads */ - } fpu_fr; - struct fq *fpu_q; /* ptr to array of FQ entries */ - unsigned long fpu_fsr; /* FPU status register */ - unsigned char fpu_qcnt; /* # of entries in saved FQ */ - unsigned char fpu_q_entrysize; /* # of bytes per FQ entry */ - unsigned char fpu_en; /* flag signifying fpu in use */ - } fpregset_t; - -#else /* __WORDSIZE == 32 */ - -typedef struct fpu - { - union { /* FPU floating point regs */ - __extension__ unsigned long long fpu_regs[32]; /* 32 singles */ - double fpu_dregs[16]; /* 16 doubles */ - } fpu_fr; - struct fq *fpu_q; /* ptr to array of FQ entries */ - unsigned fpu_fsr; /* FPU status register */ - unsigned char fpu_qcnt; /* # of entries in saved FQ */ - unsigned char fpu_q_entrysize; /* # of bytes per FQ entry */ - unsigned char fpu_en; /* flag signifying fpu in use */ - } fpregset_t; - -/* - * The following structure is for associating extra register state with - * the ucontext structure and is kept within the uc_mcontext filler area. - * - * If (xrs_id == XRS_ID) then the xrs_ptr field is a valid pointer to - * extra register state. The exact format of the extra register state - * pointed to by xrs_ptr is platform-dependent. - * - * Note: a platform may or may not manage extra register state. - */ -typedef struct - { - unsigned int xrs_id; /* indicates xrs_ptr validity */ - void * xrs_ptr; /* ptr to extra reg state */ - } xrs_t; - -#define XRS_ID 0x78727300 /* the string "xrs" */ - -typedef struct - { - gregset_t gregs; /* general register set */ - gwindows_t *gwins; /* POSSIBLE pointer to register windows */ - fpregset_t fpregs; /* floating point register set */ - xrs_t xrs; /* POSSIBLE extra register state association */ - long filler[19]; - } mcontext_t; - - -/* Userlevel context. */ -typedef struct ucontext - { - unsigned long uc_flags; - struct ucontext *uc_link; - sigset_t uc_sigmask; - stack_t uc_stack; - mcontext_t uc_mcontext; - } ucontext_t; - -#endif /* __WORDSIZE == 32 */ -#endif /* sys/ucontext.h */ diff --git a/sysdeps/unix/sysv/linux/sparc/sys/user.h b/sysdeps/unix/sysv/linux/sparc/sys/user.h deleted file mode 100644 index e9e41ed64e..0000000000 --- a/sysdeps/unix/sysv/linux/sparc/sys/user.h +++ /dev/null @@ -1,86 +0,0 @@ -/* Copyright (C) 2003-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <http://www.gnu.org/licenses/>. */ - -#ifndef _SYS_USER_H -#define _SYS_USER_H 1 - -#include <stddef.h> - -struct sunos_regs -{ - unsigned int psr, pc, npc, y; - unsigned int regs[15]; -}; - -struct sunos_fpqueue -{ - unsigned int *addr; - unsigned int inst; -}; - -struct sunos_fp -{ - union - { - unsigned int regs[32]; - double reg_dbls[16]; - } fregs; - unsigned int fsr; - unsigned int flags; - unsigned int extra; - unsigned int fpq_count; - struct sunos_fpqueue fpq[16]; -}; - -struct sunos_fpu -{ - struct sunos_fp fpstatus; -}; - -/* The SunOS core file header layout. */ -struct user { - unsigned int magic; - unsigned int len; - struct sunos_regs regs; - struct - { - unsigned char a_dynamic :1; - unsigned char a_toolversion :7; - unsigned char a_machtype; - unsigned short a_info; - unsigned int a_text; - unsigned int a_data; - unsigned int a_bss; - unsigned int a_syms; - unsigned int a_entry; - unsigned int a_trsize; - unsigned int a_drsize; - } uexec; - int signal; - size_t u_tsize; - size_t u_dsize; - size_t u_ssize; - char u_comm[17]; - struct sunos_fpu fpu; - unsigned int sigcode; -}; - -#define NBPG 0x2000 -#define UPAGES 1 -#define SUNOS_CORE_MAGIC 0x080456 - -#endif |