From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17788 invoked by alias); 1 Nov 2011 20:56:18 -0000 Received: (qmail 17776 invoked by uid 22791); 1 Nov 2011 20:56:16 -0000 X-SWARE-Spam-Status: No, hits=0.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,URI_BLOGSPOT X-Spam-Check-By: sourceware.org Received: from stl-smtpout-01.boeing.com (HELO stl-smtpout-01.boeing.com) (130.76.96.56) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 01 Nov 2011 20:56:00 +0000 Received: from blv-av-01.boeing.com (blv-av-01.boeing.com [130.247.48.231]) by stl-smtpout-01.ns.cs.boeing.com (8.14.4/8.14.4/8.14.4/SMTPOUT) with ESMTP id pA1Ktjuj025345 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 1 Nov 2011 15:55:48 -0500 (CDT) Received: from blv-av-01.boeing.com (localhost [127.0.0.1]) by blv-av-01.boeing.com (8.14.4/8.14.4/DOWNSTREAM_RELAY) with ESMTP id pA1KthUp029538; Tue, 1 Nov 2011 13:55:43 -0700 (PDT) Received: from XCH-MWHT-03.mw.nos.boeing.com (xch-mwht-03.mw.nos.boeing.com [134.57.119.161]) by blv-av-01.boeing.com (8.14.4/8.14.4/UPSTREAM_RELAY) with ESMTP id pA1KtF31028215 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=OK); Tue, 1 Nov 2011 13:55:40 -0700 (PDT) Received: from XCH-MW-08V.mw.nos.boeing.com ([134.57.119.191]) by XCH-MWHT-03.mw.nos.boeing.com ([134.57.119.161]) with mapi; Tue, 1 Nov 2011 15:55:23 -0500 From: "Moffett, Kyle D" To: "647288@bugs.debian.org" <647288@bugs.debian.org> CC: Anthony Green , "libffi-discuss@sourceware.org" Date: Tue, 01 Nov 2011 20:56:00 -0000 Subject: Re: libffi: Simplify PowerPC assembly and avoid CPU-specific string instructions Message-ID: <7E3F9414-3902-415A-871F-AC022690B936@boeing.com> References: <20111101155343.30222.16020.reportbug@eternium.exmeritus.com> In-Reply-To: <20111101155343.30222.16020.reportbug@eternium.exmeritus.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Mailing-List: contact libffi-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libffi-discuss-owner@sourceware.org X-SW-Source: 2011/txt/msg00200.txt.bz2 On Nov 01, 2011, at 11:53, Kyle Moffett wrote: > After upgrading to a new version of GNU ld for PowerPC e500, I started > seeing build errors on e500 systems again. It turns out that the > PowerPC "string instructions" are unimplemented on PPC440 and most other > embedded cores, and also cause unexpectedly high instruction latencies > and pipeline stalls even on POWER processors. >=20 > This historically worked in the past because the unknown string opcodes > are trapped on PPC440 and similar systems and emulated in the kernel, > though that is obviously very inefficient and undesirable. >=20 > Since the struct-copy code doesn't really need to be implemented in > assembly, this patch ensures that there is always enough space to store > both r3 and r4 and then uses C to extract the 1-8 byte "small struct" > into the user-provided memory. >=20 > Even with all the big new comments, it's still removes 11 lines of code, > and the ASM is much simpler and easier to understand now. >=20 > Please consider applying. Oh, I forgot to mention the testing I did on this patch: I have applied this patch on top of the previous PowerPC SPE patches (Debian version 3.0.10-3) and it builds, passes the testsuite, and correctly installs on powerpc, powerpc64, and e500v2. NOTE: The e500v2 testsuite does have one unrelated failure with GCC-4.6 even with this patch due to GCC PR target/50906: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D50906 Cheers, Kyle Moffett -- Curious about my work on the Debian powerpcspe port? I'm keeping a blog here: http://pureperl.blogspot.com/