* Re: libffi: Simplify PowerPC assembly and avoid CPU-specific string instructions [not found] <20111101155343.30222.16020.reportbug@eternium.exmeritus.com> @ 2011-11-01 20:56 ` Moffett, Kyle D 2011-11-12 20:56 ` Anthony Green 0 siblings, 1 reply; 2+ messages in thread From: Moffett, Kyle D @ 2011-11-01 20:56 UTC (permalink / raw) To: 647288; +Cc: Anthony Green, libffi-discuss 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. 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=50906 Cheers, Kyle Moffett -- Curious about my work on the Debian powerpcspe port? I'm keeping a blog here: http://pureperl.blogspot.com/ ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: libffi: Simplify PowerPC assembly and avoid CPU-specific string instructions 2011-11-01 20:56 ` libffi: Simplify PowerPC assembly and avoid CPU-specific string instructions Moffett, Kyle D @ 2011-11-12 20:56 ` Anthony Green 0 siblings, 0 replies; 2+ messages in thread From: Anthony Green @ 2011-11-12 20:56 UTC (permalink / raw) To: Moffett, Kyle D; +Cc: 647288, libffi-discuss 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 ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-11-12 20:56 UTC | newest] Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <20111101155343.30222.16020.reportbug@eternium.exmeritus.com> 2011-11-01 20:56 ` libffi: Simplify PowerPC assembly and avoid CPU-specific string instructions Moffett, Kyle D 2011-11-12 20:56 ` Anthony Green
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).