1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00
2003-06-17  Paul Mackerras  <paulus@samba.org>

	* sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S: New file.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/makecontext.S: New file.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S: New file.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S: New file.
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.h: New file.
	* sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h: Adjust.
This commit is contained in:
Ulrich Drepper
2003-06-18 03:38:07 +00:00
parent 1d53508d2c
commit aebcf54cb0
7 changed files with 697 additions and 5 deletions

View File

@ -26,9 +26,47 @@
included in <signal.h>. */
#include <bits/sigcontext.h>
/* A machine context is exactly a sigcontext. */
#if __WORDSIZE == 32
/* Number of general registers. */
#define NGREG 48
/* Container for all general registers. */
typedef unsigned long gregset_t[NGREG];
/* Container for floating-point registers and status */
typedef struct _libc_fpstate
{
double fpregs[32];
double fpscr;
unsigned int _pad[2];
} fpregset_t;
/* Container for Altivec/VMX registers and status.
Needs to be aligned on a 16-byte boundary. */
typedef struct _libc_vrstate
{
unsigned int vrregs[32][4];
unsigned int vscr;
unsigned int vrsave;
unsigned int _pad[2];
} vrregset_t;
/* Context to describe whole processor state. */
typedef struct
{
gregset_t gregs;
fpregset_t fpregs;
vrregset_t vrregs __attribute__((__aligned__(16)));
} mcontext_t;
#else
/* For 64-bit, a machine context is exactly a sigcontext. */
typedef struct sigcontext mcontext_t;
#endif
/* Userlevel context. */
typedef struct ucontext
{
@ -36,12 +74,14 @@ typedef struct ucontext
struct ucontext *uc_link;
stack_t uc_stack;
#if __WORDSIZE == 32
mcontext_t uc_mcontext;
__sigset_t uc_sigmask;
#else
/* These fields are for backwards compatibility. */
int uc_pad[7];
mcontext_t *uc_regs;
unsigned int uc_oldsigmask[2];
int uc_pad2;
#endif
sigset_t uc_sigmask;
mcontext_t uc_mcontext; /* last for extensibility */
#endif
} ucontext_t;
#endif /* sys/ucontext.h */