This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: IA-64 and const
- From: Richard Henderson <rth at redhat dot com>
- To: Thomas Koenig <Thomas dot Koenig at online dot de>
- Cc: gcc at gcc dot gnu dot org
- Date: Sun, 5 Dec 2004 10:11:24 -0800
- Subject: Re: IA-64 and const
- References: <20041205120953.GA4731@meiner.onlinehome.de>
On Sun, Dec 05, 2004 at 01:09:53PM +0100, Thomas Koenig wrote:
> what is the reason why
>
> const int answer=42;
>
> isn't put into a read-only section on the IA-64 (compare
> http://gcc.gnu.org/PR18566 ) ? Can this be changed?
Because it's quicker to load the value if it's placed in the
small data section. Of course, Fortran doesn't *want* to load
the value directly, so that doesn't do any good.
It couldn't be changed arbitrarily, but it wouldn't be impossible
to come up with some way for the Fortran front end to annotate
its CONST_DECLs such that the target doesn't consider that
particular object for the small data section.
r~