commit b02b5fd160095f12c706e8b731bcc1feb6855d58
parent fe1c4b0df744e9773a52356baaa91024c8e83e31
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Fri, 1 Jul 2022 18:37:00 +0200
as: Use an addional array for ins list
We were using the array opstart to mark the opcodes that
already were parsed in mktbl.awk but it failed when the
opcode in position 0 had a repetition. To avoid this
problem is better to just use a new array.
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/cmd/as/mktbl.awk b/src/cmd/as/mktbl.awk
@@ -18,7 +18,8 @@ $7 !~ cpu {next}
/^$/ {next}
{
- if (opstart[$1] == 0) {
+ if (op[$1] == 0) {
+ op[$1] = 1
opstart[$1] = nvar
opnames[nop++] = $1
}