diff options
author | Yang Yujie <yangyujie@loongson.cn> | 2024-07-23 10:04:26 +0800 |
---|---|---|
committer | Lulu Cheng <chenglulu@loongson.cn> | 2024-08-02 09:37:10 +0800 |
commit | c48f38288fb17b70784ae5e71cb741e664da023a (patch) | |
tree | 19c4b5303d06858dacb9720b91f1822c1534db54 /gcc | |
parent | e4b8db26de35239bd621aad9c0361f25d957122b (diff) | |
download | gcc-c48f38288fb17b70784ae5e71cb741e664da023a.zip gcc-c48f38288fb17b70784ae5e71cb741e664da023a.tar.gz gcc-c48f38288fb17b70784ae5e71cb741e664da023a.tar.bz2 |
LoongArch: Remove gawk extension from a generator script.
gcc/ChangeLog:
* config/loongarch/genopts/gen-evolution.awk: Do not use
"length()" to compute the size of an array.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/loongarch/genopts/gen-evolution.awk | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/config/loongarch/genopts/gen-evolution.awk b/gcc/config/loongarch/genopts/gen-evolution.awk index 4d105af..1c8004e 100644 --- a/gcc/config/loongarch/genopts/gen-evolution.awk +++ b/gcc/config/loongarch/genopts/gen-evolution.awk @@ -1,4 +1,4 @@ -#!/usr/bin/gawk +#!/usr/bin/awk -f # # A simple script that generates loongarch-evolution.h # from genopts/isa-evolution.in @@ -94,8 +94,9 @@ function gen_cpucfg_useful_idx() idx_bucket[cpucfg_word[i]] = 1 delete idx_list + j = 1 for (i in idx_bucket) - idx_list[length(idx_list)-1] = i+0 + idx_list[j++] = i+0 delete idx_bucket asort (idx_list) @@ -108,7 +109,7 @@ function gen_cpucfg_useful_idx() print "" printf ("static constexpr int N_CPUCFG_WORDS = %d;\n", - idx_list[length(idx_list)] + 1) + idx_list[j - 1] + 1) delete idx_list } |