public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Creating X32 ABI code with GCC?
@ 2012-05-21 17:54 Vincent Diepeveen
  2012-05-21 18:14 ` Jonathan Wakely
  0 siblings, 1 reply; 5+ messages in thread
From: Vincent Diepeveen @ 2012-05-21 17:54 UTC (permalink / raw)
  To: gcc-help

hi,

Kernel 3.4 supports X32 ABI.

see http://kernelnewbies.org/ 
Linux_3.4#head-039c9d273884c9639937c10d68b4a3214869eb4b

This could give fantastic speedups at x64 hardware as it combines the  
advantages of 64 bits
  programming, bunch of registers, with the advantage of still  
reusing the old codes 'signed integer' lookup
which right now slows down so much in x64 as it creates an extra sign  
extension for the lookup 32 bits signed
  value to 64 bits signed value.

Does GCC already support this and if so which options can i trigger  
this with GCC?

If so does this work at all x64 processors as well?

If i google i see a few postings about X32 'backported to GCC'  
attempt in 2011 somewhere, but no confirmation whatsoever.

Thanks,
Vincent

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

* Re: Creating X32 ABI code with GCC?
  2012-05-21 17:54 Creating X32 ABI code with GCC? Vincent Diepeveen
@ 2012-05-21 18:14 ` Jonathan Wakely
  2012-05-21 18:25   ` Vincent Diepeveen
  0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Wakely @ 2012-05-21 18:14 UTC (permalink / raw)
  To: Vincent Diepeveen; +Cc: gcc-help

On 21 May 2012 18:55, Vincent Diepeveen wrote:
> hi,
>
> Kernel 3.4 supports X32 ABI.
>
> see
> http://kernelnewbies.org/Linux_3.4#head-039c9d273884c9639937c10d68b4a3214869eb4b
>
> This could give fantastic speedups at x64 hardware as it combines the
> advantages of 64 bits
>  programming, bunch of registers, with the advantage of still reusing the
> old codes 'signed integer' lookup
> which right now slows down so much in x64 as it creates an extra sign
> extension for the lookup 32 bits signed
>  value to 64 bits signed value.
>
> Does GCC already support this and if so which options can i trigger this
> with GCC?
>
> If so does this work at all x64 processors as well?
>
> If i google i see a few postings about X32 'backported to GCC' attempt in
> 2011 somewhere, but no confirmation whatsoever.

Google harder :)

If I search for x32 gc the top hit is the x32 project homepage which says

"X32 is functional complete with C, C++, Objective C and Fortran on
GCC trunk as of revision 177914"

The manual for GCC 4.7 documents the -mx32 switch at
http://gcc.gnu.org/onlinedocs/gcc-4.7.0/gcc/i386-and-x86_002d64-Options.html

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

* Re: Creating X32 ABI code with GCC?
  2012-05-21 18:14 ` Jonathan Wakely
@ 2012-05-21 18:25   ` Vincent Diepeveen
  2012-05-21 18:58     ` Ian Lance Taylor
  0 siblings, 1 reply; 5+ messages in thread
From: Vincent Diepeveen @ 2012-05-21 18:25 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc-help

John that's not what i'm looking for -m32 creates full 32 bits  
executables says manual page here.

I'm looking for 64 bits executables with 32 bits adressing. So i want  
to use the full 64 bits functionality except when it comes
  to the array lookups. If all code gets put to 32 bits you lose the  
huge advantages of 64 bits, being more registers and for
some code doing it in 64 bits is faster than 32 bits.



On May 21, 2012, at 8:14 PM, Jonathan Wakely wrote:

> On 21 May 2012 18:55, Vincent Diepeveen wrote:
>> hi,
>>
>> Kernel 3.4 supports X32 ABI.
>>
>> see
>> http://kernelnewbies.org/ 
>> Linux_3.4#head-039c9d273884c9639937c10d68b4a3214869eb4b
>>
>> This could give fantastic speedups at x64 hardware as it combines the
>> advantages of 64 bits
>>  programming, bunch of registers, with the advantage of still  
>> reusing the
>> old codes 'signed integer' lookup
>> which right now slows down so much in x64 as it creates an extra sign
>> extension for the lookup 32 bits signed
>>  value to 64 bits signed value.
>>
>> Does GCC already support this and if so which options can i  
>> trigger this
>> with GCC?
>>
>> If so does this work at all x64 processors as well?
>>
>> If i google i see a few postings about X32 'backported to GCC'  
>> attempt in
>> 2011 somewhere, but no confirmation whatsoever.
>
> Google harder :)
>
> If I search for x32 gc the top hit is the x32 project homepage  
> which says
>
> "X32 is functional complete with C, C++, Objective C and Fortran on
> GCC trunk as of revision 177914"
>
> The manual for GCC 4.7 documents the -mx32 switch at
> http://gcc.gnu.org/onlinedocs/gcc-4.7.0/gcc/i386-and-x86_002d64- 
> Options.html

That's creating a full 32 bits executable isn't it?

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

* Re: Creating X32 ABI code with GCC?
  2012-05-21 18:25   ` Vincent Diepeveen
@ 2012-05-21 18:58     ` Ian Lance Taylor
  2012-05-21 19:05       ` Vincent Diepeveen
  0 siblings, 1 reply; 5+ messages in thread
From: Ian Lance Taylor @ 2012-05-21 18:58 UTC (permalink / raw)
  To: Vincent Diepeveen; +Cc: Jonathan Wakely, gcc-help

Vincent Diepeveen <diep@xs4all.nl> writes:

> John that's not what i'm looking for -m32 creates full 32 bits
> executables says manual page here.

Jonathan said -mx32, not -m32.  It's what you want.

A bigger issue is that you will need a kernel and a glibc that support
x32 mode.

Ian

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

* Re: Creating X32 ABI code with GCC?
  2012-05-21 18:58     ` Ian Lance Taylor
@ 2012-05-21 19:05       ` Vincent Diepeveen
  0 siblings, 0 replies; 5+ messages in thread
From: Vincent Diepeveen @ 2012-05-21 19:05 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: Jonathan Wakely, gcc-help

Oh apologies John!
and thanks Ian!, i didn't read well!

I'll boot up the 16 core box and see whether this helps, many thanks!

I see it now in the PDF of GCC 4.7.0 as well -mx32

On May 21, 2012, at 8:57 PM, Ian Lance Taylor wrote:

> Vincent Diepeveen <diep@xs4all.nl> writes:
>
>> John that's not what i'm looking for -m32 creates full 32 bits
>> executables says manual page here.
>
> Jonathan said -mx32, not -m32.  It's what you want.
>
> A bigger issue is that you will need a kernel and a glibc that support
> x32 mode.
>
> Ian

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

end of thread, other threads:[~2012-05-21 19:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-21 17:54 Creating X32 ABI code with GCC? Vincent Diepeveen
2012-05-21 18:14 ` Jonathan Wakely
2012-05-21 18:25   ` Vincent Diepeveen
2012-05-21 18:58     ` Ian Lance Taylor
2012-05-21 19:05       ` Vincent Diepeveen

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