From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30339 invoked by alias); 19 Oct 2005 16:05:20 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 30317 invoked by uid 22791); 19 Oct 2005 16:05:20 -0000 Received: from e36.co.us.ibm.com (HELO e36.co.us.ibm.com) (32.97.110.154) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 19 Oct 2005 16:05:20 +0000 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e36.co.us.ibm.com (8.12.11/8.12.11) with ESMTP id j9JG5ILc007946 for ; Wed, 19 Oct 2005 12:05:18 -0400 Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by d03relay04.boulder.ibm.com (8.12.10/NCO/VERS6.7) with ESMTP id j9JG6B6k543002 for ; Wed, 19 Oct 2005 10:06:11 -0600 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.12.11/8.13.3) with ESMTP id j9JG5Hi5012513 for ; Wed, 19 Oct 2005 10:05:17 -0600 Received: from [9.10.86.22] (spokane1.rchland.ibm.com [9.10.86.22]) by d03av04.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id j9JG5GR0012289 for ; Wed, 19 Oct 2005 10:05:17 -0600 Message-ID: <43566F51.5080107@us.ibm.com> Date: Wed, 19 Oct 2005 16:05:00 -0000 From: Steve Munroe Reply-To: sjmunroe@us.ibm.com User-Agent: Mozilla/5.0 (X11; U; Linux ppc64; en-US; rv:1.7.8) Gecko/20050921 MIME-Version: 1.0 To: libc-hacker@sources.redhat.com Subject: [PATCH] PPC ucontext checking 2nd try Content-Type: multipart/mixed; boundary="------------070108030205050408070005" X-SW-Source: 2005-10/txt/msg00025.txt.bz2 This is a multi-part message in MIME format. --------------070108030205050408070005 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-length: 81 The attached patch only covers the offsets used in the current implementations. --------------070108030205050408070005 Content-Type: text/plain; name="ppc-ucontext-off-20051017.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ppc-ucontext-off-20051017.txt" Content-length: 2659 2005-10-18 Steven Munroe * 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); --------------070108030205050408070005--