[PATCH] gas: equates of registers
Jan Beulich
jbeulich@suse.com
Mon Apr 24 08:12:51 GMT 2023
On 24.04.2023 02:05, Alan Modra wrote:
> On Fri, Apr 21, 2023 at 02:17:54PM +0200, Jan Beulich wrote:
>> For ppc I wonder whether the "looking through" equates really should be
>> limited to registers only: This might be as applicable to constants
>> (including O_big), and finding e.g. O_illegal right away might be
>> helpful too.
>
> I'm happy enough with the patch as-is, or with this further
> simplification. The only concern I have is that there may be backends
> other than ppc that need symbol equate resolved early. (But I haven't
> looked, I'm leaving that to you!)
Well, so far I've gone by testsuite results (albeit on ppc I expected
that I'd need to make a change somewhere, and running the testsuite was
mainly to help find where the change is needed), but of course there's
a fair chance that some backends simply lack respective testing. Yet to
be honest, trying to understand every target's backend code just to
figure whether they also need something similar is a little beyond of
what I'm feeling up to. (I did look for certain patterns, and I'll try
to think of more which might be relevant ...)
As to the further simplification - I meanwhile think that I perhaps
better shouldn't do that: Registers (when looking for insn operands of
certain types) are quite special, and forward reference equates aren't
(normally) okay to use in such places. Forward reference equates are,
otoh, at least sometimes okay to use for e.g. constants (when a
suitable internal relocation type is available to express it), and
even finding O_illegal might (via some magic) disappear by the time we
process relocations.
Do you have any thoughts on the other two remarks (equates of constants
not being recognized as equates, and the place where to set O_register)?
Jan
More information about the Binutils
mailing list