aboutsummaryrefslogtreecommitdiff
path: root/libphobos/libdruntime/gcc
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2022-06-15 11:12:51 +0100
committerRichard Sandiford <richard.sandiford@arm.com>2022-06-15 11:12:51 +0100
commit183a4f3829243b43a28fc70e59129521033b8f8a (patch)
treecc25237a16c0dfd8d4ffc0ebe1d80871a069af65 /libphobos/libdruntime/gcc
parent7bfb3f488a7ec58109a859c66bf4eddc6354065b (diff)
downloadgcc-183a4f3829243b43a28fc70e59129521033b8f8a.zip
gcc-183a4f3829243b43a28fc70e59129521033b8f8a.tar.gz
gcc-183a4f3829243b43a28fc70e59129521033b8f8a.tar.bz2
gen: Allow unspec numbers in .md attributes
Tamar pointed out that: (unspec:M ... <FOO>) didn't work when a value of attribute FOO was defined by define_constant, such as in: (define_int_attribute FOO [(UNSPEC_A "UNSPEC_B") ...]) This is because symbolic constants are substituted during lexing and only apply to bare symbol names, not strings. One option would have been to extend this lexing substitution to define_*_attribute values as well. However, that would replace symbolic names with integer constants in the generated .cc code, making it less readable. This patch goes for the more localised approach of only applying define_constants when we want their integer value. I don't think any changes to the docs are needed. This isn't adding a new feature, it's just making an existing one work in the expected way. gcc/ * read-rtl.cc (find_int): Substitute symbolic constants before converting the string to an integer.
Diffstat (limited to 'libphobos/libdruntime/gcc')
0 files changed, 0 insertions, 0 deletions