From aebcf54cb0fe3d7e7237be9a4b2e79ca0fadfbf4 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 18 Jun 2003 03:38:07 +0000 Subject: Update. 2003-06-17 Paul Mackerras * 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. --- sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h | 50 +++++++++++++++++++++++--- 1 file changed, 45 insertions(+), 5 deletions(-) (limited to 'sysdeps/unix/sysv/linux/powerpc/sys') diff --git a/sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h b/sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h index 0f7b19c70c..9ce93c8197 100644 --- a/sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h @@ -26,9 +26,47 @@ included in . */ #include -/* 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 */ -- cgit v1.2.3-70-g09d2