This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: IA-64 and const


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]