From: Steve Munroe <sjmunroe@us.ibm.com>
To: libc-hacker@sources.redhat.com
Subject: [PATCH] PPC ucontext checking 2nd try
Date: Wed, 19 Oct 2005 16:05:00 -0000 [thread overview]
Message-ID: <43566F51.5080107@us.ibm.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 81 bytes --]
The attached patch only covers the offsets used in the current
implementations.
[-- Attachment #2: ppc-ucontext-off-20051017.txt --]
[-- Type: text/plain, Size: 2659 bytes --]
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):
Define.
diff -urN libc24-cvstip-20051017/sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.h libc24/sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.h
--- libc24-cvstip-20051017/sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.h 2004-01-15 22:49:35.000000000 -0600
+++ libc24/sysdeps/unix/sysv/linux/powerpc/powerpc32/ucontext_i.h 2005-10-19 10:37:32.616038112 -0500
@@ -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 -urN libc24-cvstip-20051017/sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.h libc24/sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.h
--- libc24-cvstip-20051017/sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.h 2004-01-15 22:49:59.000000000 -0600
+++ libc24/sysdeps/unix/sysv/linux/powerpc/powerpc64/ucontext_i.h 2005-10-19 09:34:24.034971536 -0500
@@ -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);
next reply other threads:[~2005-10-19 16:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-19 16:05 Steve Munroe [this message]
2005-10-20 0:09 ` Ulrich Drepper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43566F51.5080107@us.ibm.com \
--to=sjmunroe@us.ibm.com \
--cc=libc-hacker@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).