summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1997-06-25 19:58:12 +0000
committerRalf Baechle <ralf@linux-mips.org>1997-06-25 19:58:12 +0000
commit0a396a0db4a252bc50e0b6e5a89578e9c53b35eb (patch)
treea7f86df7b463b0bdc6da53ad4d771cba3651d866
parenta038605c5838f817472771c66c8c97453a73ee3b (diff)
Generate the struct sigcontext offsets autmatically.
-rw-r--r--arch/mips/kernel/r2300_fpu.S6
-rw-r--r--arch/mips/kernel/r4k_fpu.S6
-rw-r--r--arch/mips/kernel/r6000_fpu.S6
-rw-r--r--arch/mips/tools/offset.c20
-rw-r--r--include/asm-mips/offset.h16
5 files changed, 48 insertions, 6 deletions
diff --git a/arch/mips/kernel/r2300_fpu.S b/arch/mips/kernel/r2300_fpu.S
index 04a66df4e..fc4e04617 100644
--- a/arch/mips/kernel/r2300_fpu.S
+++ b/arch/mips/kernel/r2300_fpu.S
@@ -1,4 +1,4 @@
-/* $Id: r2300_fpu.S,v 1.1 1996/06/24 06:35:26 dm Exp $
+/*
* r2300_fpu.S: Save/restore floating point context for signal handlers.
*
* This file is subject to the terms and conditions of the GNU General Public
@@ -9,12 +9,14 @@
*
* Multi-arch abstraction and asm macros for easier reading:
* Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
+ *
+ * $Id: r2300_fpu.S,v 1.2 1997/06/25 14:44:51 ralf Exp $
*/
#include <asm/asm.h>
#include <asm/fpregdef.h>
#include <asm/mipsregs.h>
+#include <asm/offset.h>
#include <asm/regdef.h>
-#include <asm/sigcontext.h>
.set mips3
.set noreorder
diff --git a/arch/mips/kernel/r4k_fpu.S b/arch/mips/kernel/r4k_fpu.S
index 6163b06a1..c5c519f4e 100644
--- a/arch/mips/kernel/r4k_fpu.S
+++ b/arch/mips/kernel/r4k_fpu.S
@@ -1,4 +1,4 @@
-/* $Id: r4k_fpu.S,v 1.3 1996/07/27 09:41:18 dm Exp $
+/*
* r4k_fpu.S: Save/restore floating point context for signal handlers.
*
* This file is subject to the terms and conditions of the GNU General Public
@@ -9,12 +9,14 @@
*
* Multi-arch abstraction and asm macros for easier reading:
* Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
+ *
+ * $Id: r4k_fpu.S,v 1.2 1997/06/25 14:44:52 ralf Exp $
*/
#include <asm/asm.h>
#include <asm/fpregdef.h>
#include <asm/mipsregs.h>
+#include <asm/offset.h>
#include <asm/regdef.h>
-#include <asm/sigcontext.h>
.set noreorder
.set mips3
diff --git a/arch/mips/kernel/r6000_fpu.S b/arch/mips/kernel/r6000_fpu.S
index 2d06f235f..66d4fa848 100644
--- a/arch/mips/kernel/r6000_fpu.S
+++ b/arch/mips/kernel/r6000_fpu.S
@@ -1,4 +1,4 @@
-/* $Id: r6000_fpu.S,v 1.1 1996/06/24 06:35:28 dm Exp $
+/*
* r6000_fpu.S: Save/restore floating point context for signal handlers.
*
* This file is subject to the terms and conditions of the GNU General Public
@@ -9,12 +9,14 @@
*
* Multi-arch abstraction and asm macros for easier reading:
* Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
+ *
+ * $Id: r6000_fpu.S,v 1.2 1997/06/25 14:44:52 ralf Exp $
*/
#include <asm/asm.h>
#include <asm/fpregdef.h>
#include <asm/mipsregs.h>
+#include <asm/offset.h>
#include <asm/regdef.h>
-#include <asm/sigcontext.h>
.set noreorder
/* Save floating point context */
diff --git a/arch/mips/tools/offset.c b/arch/mips/tools/offset.c
index a8660dcf6..3ea39e133 100644
--- a/arch/mips/tools/offset.c
+++ b/arch/mips/tools/offset.c
@@ -124,4 +124,24 @@ void output_mm_defines(void)
linefeed;
}
+void output_sc_defines(void)
+{
+ text("/* Linux sigcontext offsets. */");
+ offset("#define SC_REGMASK ", struct sigcontext, sc_regmask);
+ offset("#define SC_STATUS ", struct sigcontext, sc_status);
+ offset("#define SC_PC ", struct sigcontext, sc_pc);
+ offset("#define SC_REGS ", struct sigcontext, sc_regs);
+ offset("#define SC_FPREGS ", struct sigcontext, sc_fpregs);
+ offset("#define SC_OWNEDFP ", struct sigcontext, sc_ownedfp);
+ offset("#define SC_FPC_CSR ", struct sigcontext, sc_fpc_csr);
+ offset("#define SC_FPC_EIR ", struct sigcontext, sc_fpc_eir);
+ offset("#define SC_SSFLAGS ", struct sigcontext, sc_ssflags);
+ offset("#define SC_MDHI ", struct sigcontext, sc_mdhi);
+ offset("#define SC_MDLO ", struct sigcontext, sc_mdlo);
+ offset("#define SC_CAUSE ", struct sigcontext, sc_cause);
+ offset("#define SC_BADVADDR ", struct sigcontext, sc_badvaddr);
+ offset("#define SC_SIGSET ", struct sigcontext, sc_sigset);
+ linefeed;
+}
+
text("#endif /* !(_MIPS_OFFSET_H) */");
diff --git a/include/asm-mips/offset.h b/include/asm-mips/offset.h
index 0f6e63a25..3f5430d97 100644
--- a/include/asm-mips/offset.h
+++ b/include/asm-mips/offset.h
@@ -85,4 +85,20 @@
#define MM_PGD 8
#define MM_CONTEXT 28
+/* Linux sigcontext offsets. */
+#define SC_REGMASK 0
+#define SC_STATUS 4
+#define SC_PC 8
+#define SC_REGS 16
+#define SC_FPREGS 272
+#define SC_OWNEDFP 528
+#define SC_FPC_CSR 532
+#define SC_FPC_EIR 536
+#define SC_SSFLAGS 540
+#define SC_MDHI 544
+#define SC_MDLO 552
+#define SC_CAUSE 560
+#define SC_BADVADDR 564
+#define SC_SIGSET 568
+
#endif /* !(_MIPS_OFFSET_H) */