From 0f501b7f2a40ffaabb89dc35724aad11db2846c9 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 2 Jun 2003 19:56:35 +0000 Subject: [PATCH] Replace hard-coded offsets into struct sigcontext with generated file. * sysdeps/unix/sysv/linux/ia64/sigcontext-offsets.sym: New file. * sysdeps/unix/sysv/linux/ia64/Makefile [$(subdir) = stdlib] (gen-as-const-headers): Add it. * sysdeps/unix/sysv/linux/ia64/ucontext_i.h: Include it instead of defining SC_* macros here. --- ChangeLog | 9 +++++++++ sysdeps/unix/sysv/linux/ia64/Makefile | 1 + sysdeps/unix/sysv/linux/ia64/sigcontext-offsets.sym | 16 ++++++++++++++++ sysdeps/unix/sysv/linux/ia64/ucontext_i.h | 14 +------------- 4 files changed, 27 insertions(+), 13 deletions(-) create mode 100644 sysdeps/unix/sysv/linux/ia64/sigcontext-offsets.sym diff --git a/ChangeLog b/ChangeLog index 068eb8e..1c00428 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2003-06-02 Richard C. Bilson + + Replace hard-coded offsets into struct sigcontext with generated file. + * sysdeps/unix/sysv/linux/ia64/sigcontext-offsets.sym: New file. + * sysdeps/unix/sysv/linux/ia64/Makefile + [$(subdir) = stdlib] (gen-as-const-headers): Add it. + * sysdeps/unix/sysv/linux/ia64/ucontext_i.h: Include it instead of + defining SC_* macros here. + 2003-06-02 Jakub Jelinek * sysdeps/unix/sysv/linux/bits/sched.h (CLONE_PID): Remove. diff --git a/sysdeps/unix/sysv/linux/ia64/Makefile b/sysdeps/unix/sysv/linux/ia64/Makefile index 4c1e6f2..6ede14a 100644 --- a/sysdeps/unix/sysv/linux/ia64/Makefile +++ b/sysdeps/unix/sysv/linux/ia64/Makefile @@ -4,6 +4,7 @@ endif ifeq ($(subdir),stdlib) sysdep_routines += __start_context +gen-as-const-headers += sigcontext-offsets.sym endif ifeq ($(subdir),misc) diff --git a/sysdeps/unix/sysv/linux/ia64/sigcontext-offsets.sym b/sysdeps/unix/sysv/linux/ia64/sigcontext-offsets.sym new file mode 100644 index 0000000..943e68a --- /dev/null +++ b/sysdeps/unix/sysv/linux/ia64/sigcontext-offsets.sym @@ -0,0 +1,16 @@ +#include +#include + +-- +SC_NAT offsetof (struct sigcontext, sc_nat) +SC_BSP offsetof (struct sigcontext, sc_ar_bsp) +SC_RNAT offsetof (struct sigcontext, sc_ar_rnat) +SC_UNAT offsetof (struct sigcontext, sc_ar_unat) +SC_FPSR offsetof (struct sigcontext, sc_ar_fpsr) +SC_PFS offsetof (struct sigcontext, sc_ar_pfs) +SC_LC offsetof (struct sigcontext, sc_ar_lc) +SC_PR offsetof (struct sigcontext, sc_pr) +SC_BR offsetof (struct sigcontext, sc_br) +SC_GR offsetof (struct sigcontext, sc_gr) +SC_FR offsetof (struct sigcontext, sc_fr) +SC_MASK offsetof (struct sigcontext, sc_mask) diff --git a/sysdeps/unix/sysv/linux/ia64/ucontext_i.h b/sysdeps/unix/sysv/linux/ia64/ucontext_i.h index 2d544a7..e2a4d3c 100644 --- a/sysdeps/unix/sysv/linux/ia64/ucontext_i.h +++ b/sysdeps/unix/sysv/linux/ia64/ucontext_i.h @@ -24,19 +24,7 @@ #define SIG_UNBLOCK 1 #define SIG_SETMASK 2 -#define SC_NAT 0x008 -#define SC_BSP 0x048 -#define SC_RNAT 0x050 -#define SC_UNAT 0x060 -#define SC_FPSR 0x068 -#define SC_PFS 0x070 -#define SC_LC 0x078 -#define SC_PR 0x080 -#define SC_BR 0x088 -#define SC_GR 0x0c8 -#define SC_FR 0x1d0 -#define SC_MASK 0xa50 - +#include #define rTMP r16 #define rPOS r16 -- 2.7.4