[1/1] LoongArch: Remove gawk extension from a generator script.
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_gcc_build--master-arm |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gcc_check--master-arm |
success
|
Test passed
|
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gcc_check--master-aarch64 |
success
|
Test passed
|
Commit Message
gcc/ChangeLog:
* config/loongarch/genopts/gen-evolution.awk: Do not use
"length()" to compute the size of an array.
---
gcc/config/loongarch/genopts/gen-evolution.awk | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
@@ -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
}