]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
GAS: Replace macro LITERAL_PREFIXDOLLAR_HEX with a runtime value.
authorJohn Darrington <john@darrington.wattle.id.au>
Tue, 21 May 2019 08:11:40 +0000 (10:11 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Tue, 21 May 2019 08:29:15 +0000 (10:29 +0200)
commite2d1595531b62487749e1af680d8f0c48c684feb
tree1fa82c246269596f8b761e726779c788a9451289
parent7622049e0bef81fab900860400838bc977449892
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.
    Also, move this instance of "case '$'" next to the other one, and
    enable it only in the complementary proprocessor case.
    * 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/ChangeLog
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