This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
32 bit pointers on X86_64 architecture
- From: Maurizio Vitale <maurizio dot vitale at polymath-solutions dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 24 Jun 2008 12:16:28 -0400
- Subject: 32 bit pointers on X86_64 architecture
Hi all,
is there a way to have 4 byte (data) pointers without resorting to -
m32?
I'd like to have 64 bit code, but for a specific library I'm writing
cache behaviour
would improve if pointers were smaller. Pointers to code would stay
at 8 bytes.
Any suggestion?
If GCC dowsn't support this mode (and I couldn't find anything in the
documentation)
I'm thinking about using the linker scripts for forcing all data/heap
to be in 2Gb
and then add the top 32 bits when dereferencing "pointers", if
there's a way to get
those 32 bits as a link time constant, rather than storing them in a
memory location.
This would be done for the few pointers I actually care about.
Thanks in advance,
Maurizio