From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22180 invoked by alias); 18 Sep 2013 18:25:20 -0000 Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org Received: (qmail 22128 invoked by uid 89); 18 Sep 2013 18:25:19 -0000 Received: from e9.ny.us.ibm.com (HELO e9.ny.us.ibm.com) (32.97.182.139) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 18 Sep 2013 18:25:19 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.8 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 X-HELO: e9.ny.us.ibm.com Received: from /spool/local by e9.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 18 Sep 2013 14:25:12 -0400 Received: from d01dlp03.pok.ibm.com (9.56.250.168) by e9.ny.us.ibm.com (192.168.1.109) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 18 Sep 2013 14:25:10 -0400 Received: from b01cxnp22033.gho.pok.ibm.com (b01cxnp22033.gho.pok.ibm.com [9.57.198.23]) by d01dlp03.pok.ibm.com (Postfix) with ESMTP id 48735C90043; Wed, 18 Sep 2013 14:25:09 -0400 (EDT) Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by b01cxnp22033.gho.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r8IIP9MV39977104; Wed, 18 Sep 2013 18:25:09 GMT Received: from d01av01.pok.ibm.com (loopback [127.0.0.1]) by d01av01.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r8IIP8n7006339; Wed, 18 Sep 2013 14:25:09 -0400 Received: from spokane1.rchland.ibm.com (spokane1.rchland.ibm.com [9.10.86.94]) by d01av01.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id r8IIP8jL006272; Wed, 18 Sep 2013 14:25:08 -0400 Subject: Re: e500 port: getcontext / setcontext / swapcontext From: Steven Munroe Reply-To: munroesj@us.ibm.com To: "Joseph S. Myers" Cc: libc-alpha@sourceware.org, libc-ports@sourceware.org, "Ryan S. Arnold" In-Reply-To: References: Content-Type: text/plain Date: Wed, 18 Sep 2013 18:25:00 -0000 Message-Id: <1379528954.4899.19.camel@spokane1.rchland.ibm.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13091818-7182-0000-0000-00000872E6F6 X-SW-Source: 2013-09/txt/msg00101.txt.bz2 On Wed, 2013-09-18 at 17:29 +0000, Joseph S. Myers wrote: > This patch adds e500 support to powerpc getcontext / setcontext / > swapcontext. Like setjmp/longjmp, it's compile-time conditional > rather than using HWCAPs. Unlike setjmp/longjmp, this is following an > external ABI: the context layout used by the Linux kernel. Nothing is > done about the ACC register; as it's call-clobbered and not used for > argument passing, only the signal context case needs to handle it and > that does it via a syscall. (But as is generally usual for context > code in glibc, this code doesn't otherwise try to limit GPR saving / > restoring to avoid call-clobbered registers for which it isn't > actually needed.) > > To avoid duplication of the code sequences between getcontext / > setcontext and swapcontext, they are put in assembler macros defined > in a single place, and those macros are then used as needed under the > __CONTEXT_ENABLE_E500 conditional. > Joseph I must really question the wisdom of merging the e500 into the same source with the "classical" PPC32 code. The unified GPR/FPR set of the e500 impacts the ABI in many different ways from the classic PPC32 soft-float or hard-float that I fear this will be a constant source of misunderstanding and error in the future. I am much more comfortable keeping the e500 specific codes in different source files and different parts of the tree.