[AArch64] Fix geniterators.sh to use standard BRE syntax in sed

On behalf of Szabolcs Nagy.

2015-05-06  Szabolcs Nagy  <szabolcs.nagy@arm.com>

	* config/aarch64/geniterators.sh: Use standard BRE in sed.

From-SVN: r222852
This commit is contained in:
Szabolcs Nagy 2015-05-06 13:23:01 +00:00 committed by Kyrylo Tkachov
parent d5e6e133bb
commit 2149da1b26
2 changed files with 8 additions and 3 deletions

View file

@ -1,3 +1,7 @@
2015-05-06 Szabolcs Nagy <szabolcs.nagy@arm.com>
* config/aarch64/geniterators.sh: Use standard BRE in sed.
2015-05-06 Alan Modra <amodra@gmail.com>
PR target/66033

View file

@ -32,14 +32,15 @@ echo "#define GCC_AARCH64_ITERATORS_H"
# which does not have a matching brace because it contains characters we
# don't want to or can't handle (e.g P, PTR iterators change depending on
# Pmode and ptr_mode).
export LC_ALL=C
cat $1 | tr "\n" " " \
| sed 's/(define_mode_iterator \([A-Za-z0-9_]*\) \([]\[A-Z0-9 \t]*\)/\n#define BUILTIN_\1(T, N, MAP) \\ \2\n/g' \
| grep '#define [A-Z0-9_(), \\]* \[[A-Z0-9[:space:]]*]' \
| sed 's/\t//g' \
| sed 's/ \+/ /g' \
| sed 's/ \[\([A-Z0-9 ]*\)]/\n\L\1/' \
| sed 's/ */ /g' \
| sed 's/ \[\([A-Z0-9 ]*\)]/\n\1/' \
| awk ' BEGIN { FS = " " ; OFS = ", "} \
/#/ { print } \
! /#/ { $1 = $1 ; printf " VAR%d (T, N, MAP, %s)\n", NF, $0 }'
! /#/ { $1 = $1 ; printf " VAR%d (T, N, MAP, %s)\n", NF, tolower($0) }'
echo "#endif /* GCC_AARCH64_ITERATORS_H */"