aboutsummaryrefslogtreecommitdiff
path: root/gcc/json.cc
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2020-12-05 18:26:24 +0000
committerMaciej W. Rozycki <macro@linux-mips.org>2020-12-05 18:26:24 +0000
commitda749b98cf9d87ebed92de08ff45f8a0d7fc9d1a (patch)
tree203ee7142b585b6cbf8ed40d4ef44827d9ec981a /gcc/json.cc
parent8c18e22afb061329766be3532a06a85ccc492d9c (diff)
downloadgcc-da749b98cf9d87ebed92de08ff45f8a0d7fc9d1a.zip
gcc-da749b98cf9d87ebed92de08ff45f8a0d7fc9d1a.tar.gz
gcc-da749b98cf9d87ebed92de08ff45f8a0d7fc9d1a.tar.bz2
RTL: Also support HOST_WIDE_INT with int iterators
Add wide integer aka 'w' rtx format support to int iterators so that machine description can iterate over `const_int' expressions. This is made by expanding standard integer aka 'i' format support, observing that any standard integer already present in any of our existing RTL code will also fit into HOST_WIDE_INT, so there is no need for a separate handler. Any truncation of the number parsed is made by the caller. An assumption is made however that no place relies on capping out of range values to INT_MAX. Now the 'p' format is handled explicitly rather than being implied by rtx being a SUBREG, so actually assert that it is, just to play safe. gcc/ * read-rtl.c: Add a page-feed separator at the start of iterator code. (struct iterator_group): Change the return type to HOST_WIDE_INT for the `find_builtin' member. Likewise the second parameter type for the `apply_iterator' member. (atoll) [!HAVE_ATOQ]: Reorder. (find_mode, find_code): Change the return type to HOST_WIDE_INT. (apply_mode_iterator, apply_code_iterator) (apply_subst_iterator): Change the second parameter type to HOST_WIDE_INT. (find_int): Handle input suitable for HOST_WIDE_INT output. (apply_int_iterator): Rewrite in terms of explicit format interpretation. (rtx_reader::read_rtx_operand) <'w'>: Fold into... <'i', 'n', 'p'>: ... this. * doc/md.texi (Int Iterators): Document 'w' rtx format support.
Diffstat (limited to 'gcc/json.cc')
0 files changed, 0 insertions, 0 deletions