public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Compiling gcc in 64 bits mode
@ 2011-07-30  8:48 Jeremy Hall
  2011-08-01 18:23 ` kevin diggs
  0 siblings, 1 reply; 10+ messages in thread
From: Jeremy Hall @ 2011-07-30  8:48 UTC (permalink / raw)
  To: gcc-help

> I don't have any x86-64 (int64) systems. Is it better to use 64-bit on
> x86-64 even with the larger memory footprint (because the programming
> model is better (more registers, etc))?

I'd say yes.   As you suggest, there is more to x64 than the memory
footprint.  There are there are twice as many general purpose
registers amongst other things.   So for example more function
arguments are passed in registers than on the stack.

Here are some figures for a small program compiled identically on both
32 and 64 bits.

32 bit code
   Insns 15506,  Jumps 3218,  Mem refs 3819,  Stack refs 1671
64 bit code
   Insns 14631,  Jumps 3158,  Mem refs 3142,  Stack refs 1042

The 64 bit executable was only about 10% larger.

Jeremy

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Compiling gcc in 64 bits mode
  2011-07-30  8:48 Compiling gcc in 64 bits mode Jeremy Hall
@ 2011-08-01 18:23 ` kevin diggs
  0 siblings, 0 replies; 10+ messages in thread
From: kevin diggs @ 2011-08-01 18:23 UTC (permalink / raw)
  To: Jeremy Hall; +Cc: gcc-help

Hi,

On Sat, Jul 30, 2011 at 3:48 AM, Jeremy Hall <gcc.hall@gmail.com> wrote:
>> I don't have any x86-64 (int64) systems. Is it better to use 64-bit on
>> x86-64 even with the larger memory footprint (because the programming
>> model is better (more registers, etc))?
>
> I'd say yes.   As you suggest, there is more to x64 than the memory
> footprint.  There are there are twice as many general purpose
> registers amongst other things.   So for example more function
> arguments are passed in registers than on the stack.
>
> Here are some figures for a small program compiled identically on both
> 32 and 64 bits.
>
> 32 bit code
>   Insns 15506,  Jumps 3218,  Mem refs 3819,  Stack refs 1671
> 64 bit code
>   Insns 14631,  Jumps 3158,  Mem refs 3142,  Stack refs 1042
>
> The 64 bit executable was only about 10% larger.
>
> Jeremy
>

I was actually referring to the runtime size (data segment). I've
never actually tried to build a PPC 64-bit Firefox (i.e. I have a
64-bit PPC box). I'd like to see the data size usage compared to
32-bit.

kevin

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Compiling gcc in 64 bits mode
  2011-08-01 16:49         ` Ian Lance Taylor
@ 2011-08-01 20:06           ` lol37 lol37
  0 siblings, 0 replies; 10+ messages in thread
From: lol37 lol37 @ 2011-08-01 20:06 UTC (permalink / raw)
  To: gcc-help

2011/8/1 Ian Lance Taylor <iant@google.com>:
> lol37 lol37 <lol37cs16@gmail.com> writes:
>
>> Well, the mingw64 mailing list apparently can't answer me...
>> i'm stuck in the stage 2, on beginning : "checking for library
>> containing strerror... configure : error: Link tests are not allowed
>> after GCC_NO_EXECUTABLES."
>> is that because library are missing ?
>
> You need to look at the relevant config.log file to see what happened.
>
> Ian
>

this is what i expected, i did not installed required libraries, now i
must get upon the header problem, i'll get on tomorrow.
thanks :)
Sam.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Compiling gcc in 64 bits mode
  2011-08-01 10:52       ` lol37 lol37
@ 2011-08-01 16:49         ` Ian Lance Taylor
  2011-08-01 20:06           ` lol37 lol37
  0 siblings, 1 reply; 10+ messages in thread
From: Ian Lance Taylor @ 2011-08-01 16:49 UTC (permalink / raw)
  To: lol37 lol37; +Cc: gcc-help

lol37 lol37 <lol37cs16@gmail.com> writes:

> Well, the mingw64 mailing list apparently can't answer me...
> i'm stuck in the stage 2, on beginning : "checking for library
> containing strerror... configure : error: Link tests are not allowed
> after GCC_NO_EXECUTABLES."
> is that because library are missing ?

You need to look at the relevant config.log file to see what happened.

Ian

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Compiling gcc in 64 bits mode
  2011-07-29 19:58     ` Brian Budge
@ 2011-08-01 10:52       ` lol37 lol37
  2011-08-01 16:49         ` Ian Lance Taylor
  0 siblings, 1 reply; 10+ messages in thread
From: lol37 lol37 @ 2011-08-01 10:52 UTC (permalink / raw)
  To: gcc-help

Well, the mingw64 mailing list apparently can't answer me...
i'm stuck in the stage 2, on beginning : "checking for library
containing strerror... configure : error: Link tests are not allowed
after GCC_NO_EXECUTABLES."
is that because library are missing ?
Sam.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Compiling gcc in 64 bits mode
  2011-07-29 19:41   ` kevin diggs
@ 2011-07-29 19:58     ` Brian Budge
  2011-08-01 10:52       ` lol37 lol37
  0 siblings, 1 reply; 10+ messages in thread
From: Brian Budge @ 2011-07-29 19:58 UTC (permalink / raw)
  To: kevin diggs; +Cc: Ian Lance Taylor, lol37 lol37, gcc-help

On Fri, Jul 29, 2011 at 12:40 PM, kevin diggs <diggskevin38@gmail.com> wrote:
> On Fri, Jul 29, 2011 at 1:59 PM, Ian Lance Taylor <iant@google.com> wrote:
>>
>> Normally if you build gcc on a 64-bit host it will automatically be
>> configured to generate 64-bit code.
>>
> I don't have any x86-64 (int64) systems. Is it better to use 64-bit on
> x86-64 even with the larger memory footprint (because the programming
> model is better (more registers, etc))? Is there a 32-bit pointer
> (address space 64-bit programming model?
>
> Thanks!
>
> kevin
>

This depends on your program and your data requirements.  If you need
more than 4 GB address space, of course, you need to use 64-bit.  If
not, you'd have to try your individual program to see if you are
better off with 32-bit or 64-bit.

  Brian

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Compiling gcc in 64 bits mode
  2011-07-29 18:59 ` Ian Lance Taylor
@ 2011-07-29 19:41   ` kevin diggs
  2011-07-29 19:58     ` Brian Budge
  0 siblings, 1 reply; 10+ messages in thread
From: kevin diggs @ 2011-07-29 19:41 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: lol37 lol37, gcc-help

On Fri, Jul 29, 2011 at 1:59 PM, Ian Lance Taylor <iant@google.com> wrote:
>
> Normally if you build gcc on a 64-bit host it will automatically be
> configured to generate 64-bit code.
>
I don't have any x86-64 (int64) systems. Is it better to use 64-bit on
x86-64 even with the larger memory footprint (because the programming
model is better (more registers, etc))? Is there a 32-bit pointer
(address space 64-bit programming model?

Thanks!

kevin

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Compiling gcc in 64 bits mode
  2011-07-29 18:30 lol37 lol37
  2011-07-29 18:59 ` Ian Lance Taylor
@ 2011-07-29 19:07 ` lol37 lol37
  1 sibling, 0 replies; 10+ messages in thread
From: lol37 lol37 @ 2011-07-29 19:07 UTC (permalink / raw)
  To: gcc-help

If i am on a 64-bit platform but my gcc is 32 bits compiled, i would
have to configure with corresponding target, isn't it ?

Sam.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Compiling gcc in 64 bits mode
  2011-07-29 18:30 lol37 lol37
@ 2011-07-29 18:59 ` Ian Lance Taylor
  2011-07-29 19:41   ` kevin diggs
  2011-07-29 19:07 ` lol37 lol37
  1 sibling, 1 reply; 10+ messages in thread
From: Ian Lance Taylor @ 2011-07-29 18:59 UTC (permalink / raw)
  To: lol37 lol37; +Cc: gcc-help

lol37 lol37 <lol37cs16@gmail.com> writes:

> now that i know and compiled with success gcc, i wonder how i can make
> a gcc compiler for 64 bits platform, is the compiliation process is
> the same except that extras flags are involved, and if yes, which ?
> i've looked on the net for binutils i found --enable-64-bit-bfd,
> --host=x86_64-mingw32 and also for --target
> is there any other flags for gcc dependencies ( like gmp, mpfr, mpc,
> pthread ... ) ?

Normally if you build gcc on a 64-bit host it will automatically be
configured to generate 64-bit code.

If you are building gcc on a 32-bit x86 host, you can use the configure
option --enable-targets=all to include support for 64-bit x86.  See the
installation documentation.

You can also use --target but for various reasons that is harder.

Ian

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Compiling gcc in 64 bits mode
@ 2011-07-29 18:30 lol37 lol37
  2011-07-29 18:59 ` Ian Lance Taylor
  2011-07-29 19:07 ` lol37 lol37
  0 siblings, 2 replies; 10+ messages in thread
From: lol37 lol37 @ 2011-07-29 18:30 UTC (permalink / raw)
  To: gcc-help

Hello everybody,
now that i know and compiled with success gcc, i wonder how i can make
a gcc compiler for 64 bits platform, is the compiliation process is
the same except that extras flags are involved, and if yes, which ?
i've looked on the net for binutils i found --enable-64-bit-bfd,
--host=x86_64-mingw32 and also for --target
is there any other flags for gcc dependencies ( like gmp, mpfr, mpc,
pthread ... ) ?
Thanks for all.
Sam.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-08-01 20:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-30  8:48 Compiling gcc in 64 bits mode Jeremy Hall
2011-08-01 18:23 ` kevin diggs
  -- strict thread matches above, loose matches on Subject: below --
2011-07-29 18:30 lol37 lol37
2011-07-29 18:59 ` Ian Lance Taylor
2011-07-29 19:41   ` kevin diggs
2011-07-29 19:58     ` Brian Budge
2011-08-01 10:52       ` lol37 lol37
2011-08-01 16:49         ` Ian Lance Taylor
2011-08-01 20:06           ` lol37 lol37
2011-07-29 19:07 ` lol37 lol37

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).