This is the mail archive of the gcc-patches@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: Unit-at-time related PRs


On some of the compact ISAs, e.g. SH, Thumb (ARM), MIPS16, the only addressing
mode you have for getting to global data is pc-relative with an 8 bit offset.
The only way to make this work is to have per function constant tables which
are placed inside the function if the function is larger than 256 bytes.
This was originally done with machine dependent code in one port, then copied
in the other two ports, and maybe also some others.  This code could perhaps
be generalized, but no one has tried it yet.  It gets a bit tricky, because
you have to worry about branch relaxation at the same time you are inserting
constant pools into the middle of the function.

Per file constant sharing does not work at all for such a target, because you
won't be able to generate addresses to the shared constant pools, at least
not with any reasonable efficiency.

Jim


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