ref: c29e1e711c5e0b6ad83f93d65a88d320302402d1
parent: ff68f635591d2e924681d45c8b1485ef02dc442f
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Mon Dec 18 19:49:58 EST 2017
[as] Sort op data Our algorithm is based in that all the occurrences of the same verbs are consecutive in the instruction array, so if we don't sort them based in the first key then the algorith will fail.
--- a/as/target/amd64/target.mk
+++ b/as/target/amd64/target.mk
@@ -7,8 +7,8 @@
set -e ;\
rm -f $@;\
trap "rm -f $$$$.c" 0 2 3; \
+ sort -k1 target/x86/x86.dat | \
awk -v cpu=BITS64 -v family=x86 \
- -f target/gen.awk \
- < target/x86/x86.dat > $$$$.c && mv $$$$.c $@
+ -f target/gen.awk > $$$$.c && mv $$$$.c $@
OBJ-amd64 = $(OBJ) $(AMD64_LST)
--- a/as/target/i386/target.mk
+++ b/as/target/i386/target.mk
@@ -7,8 +7,8 @@
set -e ;\
rm -f $@;\
trap "rm -f $$$$.c" 0 2 3; \
+ sort -k1 target/x86/x86.dat | \
awk -v cpu=BITS32 -v family=x86 \
- -f target/gen.awk \
- < target/x86/x86.dat > $$$$.c && mv $$$$.c $@
+ -f target/gen.awk > $$$$.c && mv $$$$.c $@
OBJ-i386 = $(OBJ) $(I386_LST)
--- a/as/target/z80/target.mk
+++ b/as/target/z80/target.mk
@@ -7,8 +7,8 @@
set -e ;\
rm -f $@;\
trap "rm -f $$$$.c" 0 2 3; \
+ sort -k1 target/x80/x80.dat | \
awk -v cpu=Z80 -v family=x80 \
- -f target/gen.awk \
- < target/x80/x80.dat > $$$$.c && mv $$$$.c $@
-
+ -f target/gen.awk > $$$$.c && mv $$$$.c $@
+
OBJ-z80 = $(OBJ) $(Z80_LST)