This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: 64-bit integers - long long (only on x86?)
- From: Jan Hubicka <jh at suse dot cz>
- To: David Rasmussen <david dot rasmussen at gmx dot net>
- Cc: gcc at gcc dot gnu dot org
- Date: Sun, 12 May 2002 18:43:24 +0200
- Subject: Re: 64-bit integers - long long (only on x86?)
- References: <3CDE8F1A.5080809@gmx.net>
> In my own experience, gcc does poorer than other good compilers when
> dealing with long long 64-bit integers on x86. I have also talked to
> others experiencing the same, and just the other day, Jack Lloyd posted
> a link to some results which indicated the same. Is there a wellknown
> reason for this, and what is it? If it's not wellknown, I will produce
It is well known. The GCC register allocator assumes that the both parts
of long long needs to be stored in consetuctive registers limiting the
amount of choices it have resulting in ugly code.
Sadly changing this design decision is nontrivial, but some steps are being
worked on.
Honza
> some examples, for comparison. Code that is heavily based on long long
> calculations on x86, usually is about 30% faster on Intel's and
> Microsofts compilers, compared to gcc, which is considerable. That
> number is consistent with the numbers from Jack Lloyd's link.
>
> /David