This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: Support more than 2 relaxation passes
On Wed, Mar 08, 2006 at 12:08:49PM -0800, James E Wilson wrote:
> On Wed, 2006-03-08 at 11:38, H. J. Lu wrote:
> > I need to run more than 2 relaxation passes. This patch allows a
> > backend to have more than 2 relaxation passes.
>
> Why?
We like to relax "addl r1=@gpel(foo),gp" from GPREL22 to GPREL64I,
similar to br relaxation. We have 2 passes now, one for PCRELXXX
and the other for LOTFF22X, which may turn into GPREL22. We can't do
GPREL relaxation during PCRELXXX pass since gp may change due to
code increase. I am not sure if we can do GPREL relaxation with
LOTFF22X relaxation together since LOTFF22X may turn into GPREL
and GPREL relaxation will also increase code size. We are thinking
to add a 3rd optional pass for GPREL relaxation. Even if the code
size does increase, gp should be adjusted to compensate that without
GPREL overflow.
H.J.