Skip to content

Commit

Permalink
Replace hard-coded offsets into struct sigcontext with generated file.
Browse files Browse the repository at this point in the history
	* 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.
  • Loading branch information
Roland McGrath committed Jun 2, 2003
1 parent 4a5f21e commit 0f501b7
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 13 deletions.
9 changes: 9 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
2003-06-02 Richard C. Bilson <rcbilson@plg.uwaterloo.ca>

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 <jakub@redhat.com>

* sysdeps/unix/sysv/linux/bits/sched.h (CLONE_PID): Remove.
Expand Down
1 change: 1 addition & 0 deletions sysdeps/unix/sysv/linux/ia64/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ endif

ifeq ($(subdir),stdlib)
sysdep_routines += __start_context
gen-as-const-headers += sigcontext-offsets.sym
endif

ifeq ($(subdir),misc)
Expand Down
16 changes: 16 additions & 0 deletions sysdeps/unix/sysv/linux/ia64/sigcontext-offsets.sym
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include <stddef.h>
#include <sys/ucontext.h>

--
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)
14 changes: 1 addition & 13 deletions sysdeps/unix/sysv/linux/ia64/ucontext_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <sigcontext-offsets.h>

#define rTMP r16
#define rPOS r16
Expand Down

0 comments on commit 0f501b7

Please sign in to comment.