Unit-at-time related PRs

Jim Wilson wilson@redhat.com
Thu Feb 20 22:42:00 GMT 2003


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



More information about the Gcc-patches mailing list