FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian GCC

 
 
LinkBack Thread Tools
 
Old 11-01-2011, 02:53 PM
Kyle Moffett
 
Default Bug#647288: libffi: Simplify PowerPC assembly and avoid CPU-specific string instructions

Source: libffi
Version: 3.0.10-3
Severity: wishlist
Tags: upstream patch

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.

Cheers,
Kyle Moffett

--
Curious about my work on the Debian powerpcspe port?
I'm keeping a blog here: http://pureperl.blogspot.com/

-- System Information:
Debian Release: 6.0.2
APT prefers stable
APT policy: (1010, 'stable'), (700, 'testing'), (600, 'unstable'), (500, 'stable-updates'), (500, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
 
Old 11-01-2011, 07:55 PM
"Moffett, Kyle D"
 
Default Bug#647288: libffi: Simplify PowerPC assembly and avoid CPU-specific string instructions

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/




--
To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 7E3F9414-3902-415A-871F-AC022690B936@boeing.com">http://lists.debian.org/7E3F9414-3902-415A-871F-AC022690B936@boeing.com
 
Old 11-12-2011, 07:56 PM
Anthony Green
 
Default Bug#647288: libffi: Simplify PowerPC assembly and avoid CPU-specific string instructions

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



--
To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 4EBEDD6F.4060408@moxielogic.com">http://lists.debian.org/4EBEDD6F.4060408@moxielogic.com
 
Old 01-11-2012, 12:28 AM
"Moffett, Kyle D"
 
Default Bug#647288: libffi: Simplify PowerPC assembly and avoid CPU-specific string instructions

On Nov 12, 2011, at 15:56, Anthony Green wrote:
> On 11/1/2011 4:55 PM, Moffett, Kyle D wrote:
>> On Nov 01, 2011, at 11:53, Kyle Moffett wrote:
>>> 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).

Debian GCC Maintainers,

This patch ended up in libffi in gcc-4.6, but it still has not been
applied to the libffi-3.0.10 package. If possible, please release an
updated version with this patch applied for PowerPCSPE.

Thanks!

Cheers,
Kyle Moffett



--
To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 1D64BD61-BE8C-4751-AC41-BBFED286D146@boeing.com">http://lists.debian.org/1D64BD61-BE8C-4751-AC41-BBFED286D146@boeing.com
 

Thread Tools




All times are GMT. The time now is 11:15 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org