gas/symbols: introduce md_resolve_symbol
authorDmitry Selyutin <ghostmansd@gmail.com>
Mon, 18 Jul 2022 09:46:53 +0000 (12:46 +0300)
committerAlan Modra <amodra@gmail.com>
Wed, 20 Jul 2022 02:50:14 +0000 (12:20 +0930)
commitffd29c9c21422ddacdd66ead68ee060ac01a28c5
tree8a11642e5cd5e8dce66bd2ab172105d65cf7c28f
parent73d9afb778a2278c9a6fcc17f9a2c2ccbef8cce5
gas/symbols: introduce md_resolve_symbol

Assuming GMSD is a special operand, marked as O_md1, the code:

    .set VREG, GMSD
    .set REG, VREG
    extsw REG, 2

...fails upon attempts to resolve the value of the symbol. This happens
since machine-dependent values are not handled in the giant op switch.
We introduce a custom md_resolve_symbol macro; the ports can use this
macro to customize the behavior when resolve_symbol_value hits O_md
operand.
gas/doc/internals.texi
gas/symbols.c