summary refs log tree commit diff
path: root/sysdeps/unix
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-03-20 22:56:08 +0000
committerUlrich Drepper <drepper@redhat.com>2000-03-20 22:56:08 +0000
commitdb8409143eb9aee94e436d22d4c9260d8840b337 (patch)
treee665922bc3ada8be5f1ad32641af5322cb464b6e /sysdeps/unix
parent4159e3870191b0f6bea45867b9eb7675cff9a476 (diff)
downloadglibc-db8409143eb9aee94e436d22d4c9260d8840b337.tar.gz
glibc-db8409143eb9aee94e436d22d4c9260d8840b337.tar.xz
glibc-db8409143eb9aee94e436d22d4c9260d8840b337.zip
Update.
2000-03-16  Thorsten Kukuk  <kukuk@suse.de>

	* sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h: New.
Diffstat (limited to 'sysdeps/unix')
-rw-r--r--sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h125
1 files changed, 125 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h b/sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h
new file mode 100644
index 0000000000..59f2ffb0bc
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/sparc/bits/sigcontext.h
@@ -0,0 +1,125 @@
+/* Copyright (C) 2000 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 Library General Public License as
+   published by the Free Software Foundation; either version 2 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
+   Library General Public License for more details.
+
+   You should have received a copy of the GNU Library General Public
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
+# error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
+#endif
+
+#include <bits/wordsize.h>
+
+#define SUNOS_MAXWIN   31
+
+/* A register window */
+struct reg_window {
+  unsigned long locals[8];
+  unsigned long ins[8];
+};
+
+#if __WORDSIZE == 64
+
+/* This is what SunOS doesn't, so we have to write this alone. */
+struct sigcontext {
+  int sigc_onstack;      /* state to restore */
+  int sigc_mask;         /* sigmask to restore */
+  unsigned long sigc_sp;   /* stack pointer */
+  unsigned long sigc_pc;   /* program counter */
+  unsigned long sigc_npc;  /* next program counter */
+  unsigned long sigc_psr;  /* for condition codes etc */
+  unsigned long sigc_g1;   /* User uses these two registers */
+  unsigned long sigc_o0;   /* within the trampoline code. */
+
+  /* Now comes information regarding the users window set
+     at the time of the signal. */
+  int sigc_oswins;       /* outstanding windows */
+
+  /* stack ptrs for each regwin buf */
+  char *sigc_spbuf[SUNOS_MAXWIN];
+
+  /* Windows to restore after signal */
+  struct reg_window sigc_wbuf[SUNOS_MAXWIN];
+};
+
+struct pt_regs {
+        unsigned long u_regs[16]; /* globals and ins */
+        unsigned long tstate;
+        unsigned long tpc;
+        unsigned long tnpc;
+        unsigned int y;
+        unsigned int fprs;
+};
+
+typedef struct {
+        struct     pt_regs si_regs;
+        long       si_mask;
+} __siginfo_t;
+
+typedef struct {
+        unsigned   int si_float_regs [64];
+        unsigned   long si_fsr;
+        unsigned   long si_gsr;
+        unsigned   long si_fprs;
+} __siginfo_fpu_t;
+
+#else
+
+/* This is what SunOS does, so shall I. */
+struct sigcontext {
+  int sigc_onstack;      /* state to restore */
+  int sigc_mask;         /* sigmask to restore */
+  int sigc_sp;           /* stack pointer */
+  int sigc_pc;           /* program counter */
+  int sigc_npc;          /* next program counter */
+  int sigc_psr;          /* for condition codes etc */
+  int sigc_g1;           /* User uses these two registers */
+  int sigc_o0;           /* within the trampoline code. */
+
+  /* Now comes information regarding the users window set
+     at the time of the signal. */
+  int sigc_oswins;       /* outstanding windows */
+
+  /* stack ptrs for each regwin buf */
+  char *sigc_spbuf[SUNOS_MAXWIN];
+
+  /* Windows to restore after signal */
+  struct reg_window sigc_wbuf[SUNOS_MAXWIN];
+};
+
+struct pt_regs {
+        unsigned long psr;
+        unsigned long pc;
+        unsigned long npc;
+        unsigned long y;
+        unsigned long u_regs[16]; /* globals and ins */
+};
+
+typedef struct {
+  struct pt_regs  si_regs;
+  int             si_mask;
+} __siginfo_t;
+
+typedef struct {
+  unsigned   long si_float_regs [32];
+  unsigned   long si_fsr;
+  unsigned   long si_fpqdepth;
+  struct {
+    unsigned long *insn_addr;
+    unsigned long insn;
+  } si_fpqueue [16];
+} __siginfo_fpu_t;
+
+#endif