scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit f86ee47da07f4798b99313f4d47ba882155a9ad8
parent 49ed469e4c0e214acb6fd0ba79bb3d2bd4eee0a5
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Tue, 19 Dec 2017 00:49:58 +0100

[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.

Diffstat:
Mas/target/amd64/target.mk | 4++--
Mas/target/i386/target.mk | 4++--
Mas/target/z80/target.mk | 6+++---
3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/as/target/amd64/target.mk b/as/target/amd64/target.mk @@ -7,8 +7,8 @@ target/amd64/instbl.c: target/gen.awk target/x86/x86.dat target/x86/rules.dat 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) diff --git a/as/target/i386/target.mk b/as/target/i386/target.mk @@ -7,8 +7,8 @@ target/i386/instbl.c: target/gen.awk target/x86/x86.dat 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) diff --git a/as/target/z80/target.mk b/as/target/z80/target.mk @@ -7,8 +7,8 @@ target/z80/instbl.c: target/gen.awk target/x80/x80.dat target/x80/rules.dat 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)