public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Anthony Green <green@moxielogic.com>
To: "Moffett, Kyle D" <Kyle.D.Moffett@boeing.com>
Cc: "647288@bugs.debian.org" <647288@bugs.debian.org>,
	 "libffi-discuss@sourceware.org" <libffi-discuss@sourceware.org>
Subject: Re: libffi: Simplify PowerPC assembly and avoid CPU-specific string instructions
Date: Sat, 12 Nov 2011 20:56:00 -0000	[thread overview]
Message-ID: <4EBEDD6F.4060408@moxielogic.com> (raw)
In-Reply-To: <7E3F9414-3902-415A-871F-AC022690B936@boeing.com>

On 11/1/2011 4:55 PM, Moffett, Kyle D wrote:
> 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.
>>
>> 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.
>>
>> 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.
>>
>> 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.
>>
>> Please consider applying.
>


I like this patch, and have applied it after a minor tweak (cache 
cif->rtype->size in a local var to avoid multiple accesses).

Thanks!

AG

      reply	other threads:[~2011-11-12 20:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20111101155343.30222.16020.reportbug@eternium.exmeritus.com>
2011-11-01 20:56 ` Moffett, Kyle D
2011-11-12 20:56   ` Anthony Green [this message]

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=4EBEDD6F.4060408@moxielogic.com \
    --to=green@moxielogic.com \
    --cc=647288@bugs.debian.org \
    --cc=Kyle.D.Moffett@boeing.com \
    --cc=libffi-discuss@sourceware.org \
    /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).