From 2149da1b264e7b11d5da6dda6426b53ca5ae739f Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Wed, 6 May 2015 13:23:01 +0000 Subject: [PATCH] [AArch64] Fix geniterators.sh to use standard BRE syntax in sed On behalf of Szabolcs Nagy. 2015-05-06 Szabolcs Nagy * config/aarch64/geniterators.sh: Use standard BRE in sed. From-SVN: r222852 --- gcc/ChangeLog | 4 ++++ gcc/config/aarch64/geniterators.sh | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 24b40750898..8ed93d5e1df 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2015-05-06 Szabolcs Nagy + + * config/aarch64/geniterators.sh: Use standard BRE in sed. + 2015-05-06 Alan Modra PR target/66033 diff --git a/gcc/config/aarch64/geniterators.sh b/gcc/config/aarch64/geniterators.sh index de9dfd253b3..f908e890b41 100644 --- a/gcc/config/aarch64/geniterators.sh +++ b/gcc/config/aarch64/geniterators.sh @@ -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 */" -- 2.30.2