about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/powerpc/sys
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-06-18 03:38:07 +0000
committerUlrich Drepper <drepper@redhat.com>2003-06-18 03:38:07 +0000
commitaebcf54cb0fe3d7e7237be9a4b2e79ca0fadfbf4 (patch)
tree7aef918e1b41fcad724d1abdccb5187e30bafecc /sysdeps/unix/sysv/linux/powerpc/sys
parent1d53508d2c614ca42e93b26e4fd3d2560e92e6e1 (diff)
downloadglibc-aebcf54cb0fe3d7e7237be9a4b2e79ca0fadfbf4.tar.gz
glibc-aebcf54cb0fe3d7e7237be9a4b2e79ca0fadfbf4.tar.xz
glibc-aebcf54cb0fe3d7e7237be9a4b2e79ca0fadfbf4.zip
Update.
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.
Diffstat (limited to 'sysdeps/unix/sysv/linux/powerpc/sys')
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h50
1 files changed, 45 insertions, 5 deletions
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 <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 */