IA-64 and const
Richard Henderson
rth@redhat.com
Sun Dec 5 18:11:00 GMT 2004
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~
More information about the Gcc
mailing list