about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-10-20 00:09:39 +0000
committerUlrich Drepper <drepper@redhat.com>2005-10-20 00:09:39 +0000
commit336476cbea3b8300736bf96cabba921314843439 (patch)
treebc948af4bade6eb1dd943073cd9df10ae73998d4
parent3b8d12b8769074a037d14c20cc5a3488a39a99c8 (diff)
downloadglibc-336476cbea3b8300736bf96cabba921314843439.tar.gz
glibc-336476cbea3b8300736bf96cabba921314843439.tar.xz
glibc-336476cbea3b8300736bf96cabba921314843439.zip
* sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.h (TESTS):
	Define.
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.h (TESTS):
	Likewise.
-rw-r--r--ChangeLog7
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.h19
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.h15
3 files changed, 41 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index b24c2a6200..d6cfbb7b72 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-10-18  Steven Munroe  <sjmunroe@us.ibm.com>
+
+	* sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.h (TESTS):
+	Define.
+	* sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.h (TESTS):
+	Likewise.
+
 2005-10-19  Ulrich Drepper  <drepper@redhat.com>
 
 	* iconvdata/Makefile (modules): Add IBM1364, IBM1371, IBM1388, IBM1390,
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.h b/sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.h
index e47b24a09e..f65b0ed58c 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.h
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.h
@@ -41,3 +41,22 @@
 #define _UC_VREGS	464
 #define _UC_VSCR	976
 #define _UC_VRSAVE	980
+
+/* The registers don't have a fixed offset within ucontext because the
+   orginal ucontext only contained the regs pointer.  Also with the
+   addition of VMX to the register state the mcontext may require
+   stronger alignment (16) then the containing ucontext (4).  All access
+   to register state (pt_regs/mcontext) must be indirect via the regs
+   (uc_regs) pointer.  This means we can't test the PPC32 mcontext
+   register offsets here.  */
+
+/* Tests run in stdlib/tst-ucontext-off.  */
+#define TESTS \
+  TEST (uc_link, _UC_LINK);					\
+  TEST (uc_stack.ss_sp, _UC_STACK_SP);				\
+  TEST (uc_stack.ss_size, _UC_STACK_SIZE);			\
+  TEST (uc_mcontext.regs, _UC_REGS_PTR);			\
+  TEST (uc_mcontext.uc_regs, _UC_REGS_PTR);			\
+  TEST (uc_sigmask, _UC_SIGMASK);				\
+  TEST (uc_reg_space, _UC_REG_SPACE);
+
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.h
index 45f1bfdae9..d540cfeaf1 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.h
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.h
@@ -58,3 +58,18 @@
 #define SIGCONTEXT_FP_REGS 616
 #define SIGCONTEXT_V_REGS_PTR 880
 #define SIGCONTEXT_V_RESERVE 888
+
+/* Tests run in stdlib/tst-ucontext-off.  */
+#define TESTS \
+  TEST (uc_link, UCONTEXT_LINK);				\
+  TEST (uc_stack.ss_sp, UCONTEXT_STACK_SP);			\
+  TEST (uc_stack.ss_size, UCONTEXT_STACK_SIZE);			\
+  TEST (uc_sigmask, UCONTEXT_SIGMASK);				\
+  TEST (uc_mcontext.signal, SIGCONTEXT_SIGNAL);			\
+  TEST (uc_mcontext.handler, SIGCONTEXT_HANDLER);		\
+  TEST (uc_mcontext.oldmask, SIGCONTEXT_OLDMASK);		\
+  TEST (uc_mcontext.regs, SIGCONTEXT_PT_REGS);			\
+  TEST (uc_mcontext.gp_regs, SIGCONTEXT_GP_REGS);		\
+  TEST (uc_mcontext.fp_regs, SIGCONTEXT_FP_REGS);		\
+  TEST (uc_mcontext.v_regs, SIGCONTEXT_V_REGS_PTR);		\
+  TEST (uc_mcontext.vmx_reserve, SIGCONTEXT_V_RESERVE);