GAS: Replace macro LITERAL_PREFIXDOLLAR_HEX with a runtime value.
authorJohn Darrington <john@darrington.wattle.id.au>
Mon, 20 May 2019 17:53:30 +0000 (19:53 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Mon, 20 May 2019 17:54:31 +0000 (19:54 +0200)
commitcffc205c9eaacfa312323807cd60b9d3d1c26894
tree2ababcf4890cb2b03f1ee1c63942eea830df8836
parentefa9760914311fdd9b9a299f1e6cd5a85d64c5ff
GAS: Replace macro LITERAL_PREFIXDOLLAR_HEX with a runtime value.

In an upcoming commit, I need to be able to set the prefix used
to introduce hexadecimal literal constants using a command line
flag.   This is not currently possible, because the switch which
determines this (LITERAL_PREFIXDOLLAR_HEX) is a macro set at
build time.

This change substitutes it for a variable to be set at start up.

gas/ChangeLog:
* expr.c (literal_prefix_dollar_hex): New variable.
(operand)[case '$']: Use the new variable instead of the old macro.
* expr.h (literal_prefix_dollar_hex): Declare it.
* config/tc-epiphany.c (md_begin): Assign literal_prefix_dollar_hex.
* config/tc-ip2k.c:      ditto
* config/tc-mt.c:        ditto
* config/tc-epiphany.h (LITERAL_PREFIXDOLLAR_HEX): Remove macro definition.
* config/tc-ip2k.h:      ditto
* config/tc-mt.h:        ditto
gas/config/tc-epiphany.c
gas/config/tc-epiphany.h
gas/config/tc-ip2k.c
gas/config/tc-ip2k.h
gas/config/tc-mt.c
gas/config/tc-mt.h
gas/expr.c
gas/expr.h