tags 530901 + wontfix
reassign 530901 gcc-4.2
tags 530901 + help
thanks

I assume nobody wants to fix this for 4.2, and the build of biarch cross compilers from the gcc-4.x sources needs some work.


On 28.05.2009 19:34, Bas Wijnen wrote:
Package: gcc
Version: 4.2.4-6

The mips cross-compiler[1] generates assembly which reloads gp (by
adding a constant to t9, the function's address) at the start of every
function.  This would make sense if functions are allowed to change gp.
But AFAIK they aren't.  If they would, gp would need to be restored
after any call to a function as well, and it isn't.

While it doesn't harm the programs in their output, it does result in a
potentially large performance hit, without any reason at all.  Please
let gp be initialized in crt0.s (I didn't check if this is done
already), and remove the code from functions.

Thanks,
Bas Wijnen

[1] I built a cross compiler by using apt-get source binutils and
gcc-4.2 (later versions fail to build).  Then I used
$ TARGET=mipsel-linux-gnu fakeroot debian/rules binary-cross
for building a binutils package and
$ export GCC_TARGET=mipsel
$ export DEB_CROSS_INDEPENDENT=yes
$ debian/rules control
$ dpkg-buildpackage -uc -us -b -rfakeroot
to build the compiler itself (plus some dpkg-cross magic to install some
cross-libraries).

I made no changes to the debian sources.





--
To UNSUBSCRIBE, email to debian-gcc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to