586 vs 686

Jakub Jelinek jakub at redhat.com
Fri Feb 20 08:14:31 UTC 2009


On Fri, Feb 20, 2009 at 07:44:57AM +0100, Ralf Corsepius wrote:
> Kevin Kofler wrote:
>> Jesse Keating wrote:
>>> No, they're being made to be able to produce those for those reasons.
>>> It is yet to be seen if it will be successful, and using the x86_64
>>> kernel on i586 installs hinges upon this functionality so I recall.
>>
>> AFAIK, Debian has been shipping i386 GCC with -m64 support for ages.  The
>> drawback is that it's slower even when not using -m64 because some internal
>> types (HOST_WIDE_INT and related stuff) are larger.
>
> Not true. -m64/-32 cause gcc to switch between multilibs, when using a  
> multilibbed setup. Unless something is broken somewhere, the internal  
> types, library search paths etc. will be set up correctly.

This is actually true, not false.  If you support both -m32 and -m64,
you need 64-bit HOST_WIDE_INT, while i?86-linux configured gcc normally uses 32-bit
HOST_WIDE_INT.  On the extremely register starved i?86 using 64-bit
HOST_WIDE_INT obviously slows things down (and increases compiler memory
requirements).

What I'm probably going to do is just some hack in the gcc driver, if -m64
is passed, switch to a different cc1 backend, maybe even driver (similarly
to how -V or -b switches work) and use a i586-redhat-linux ->
x86_64-redhat-linux cross-compiler in that case.
But before doing that, we'll need either a x86_64 cross binutils or i?86
binutils supporting both i?86 and x86_64 in rawhide.

	Jakub




More information about the fedora-devel-list mailing list