use explicit markers (comments) for the bsearch table checking, simplifies the scripts and makes them more robust too :)
This commit is contained in:
3
.github/checks/Makefile
vendored
3
.github/checks/Makefile
vendored
@@ -35,8 +35,9 @@ spaces: spaces.sh
|
|||||||
noexec: noexec.sh
|
noexec: noexec.sh
|
||||||
@./noexec.sh
|
@./noexec.sh
|
||||||
|
|
||||||
sorted: sorted.sh sorted_codeopt.sh
|
sorted: sorted.sh sorted_codeopt.sh sorted_opcodes.sh
|
||||||
@./sorted.sh
|
@./sorted.sh
|
||||||
@./sorted_codeopt.sh
|
@./sorted_codeopt.sh
|
||||||
|
@./sorted_opcodes.sh
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|||||||
105
.github/checks/sorted.sh
vendored
105
.github/checks/sorted.sh
vendored
@@ -2,116 +2,39 @@
|
|||||||
OLDCWD=`pwd`
|
OLDCWD=`pwd`
|
||||||
SCRIPT_PATH=`dirname $0`
|
SCRIPT_PATH=`dirname $0`
|
||||||
|
|
||||||
|
CHECK_DIR=../../src
|
||||||
|
|
||||||
SORT_OPT=-u
|
SORT_OPT=-u
|
||||||
|
|
||||||
function checkarray_quoted_name
|
function checkarray_quoted_name
|
||||||
{
|
{
|
||||||
CHECK_FILE="$1"
|
CHECK_FILE="$1"
|
||||||
|
START="\\/\\* BEGIN SORTED.SH \\*\\/"
|
||||||
|
END="\\/\\* END SORTED.SH \\*\\/"
|
||||||
|
|
||||||
awk '/'"$2"'/{flag=1;next}/};/{flag=0}flag' "$CHECK_FILE" | \
|
awk '/'"$START"'/{flag=1; count++; next} /'"$END"'/{flag=0;} flag {print count,"##",$0}' "$CHECK_FILE" | \
|
||||||
sed -e 's:.*\"\(.*\)\".*:\1:g' | \
|
sed -e 's:\(.*\) ##.*\"\(.*\)\".*:\1##\2:g' > .a.tmp
|
||||||
sed '/^\s*$/d' > .a.tmp
|
|
||||||
|
|
||||||
if [[ -z $(grep '[^[:space:]]' .a.tmp) ]] ; then
|
if [[ -z $(grep '[^[:space:]]' .a.tmp) ]] ; then
|
||||||
echo "error: "$2" table is empty"
|
echo "error: "$1" table is empty"
|
||||||
|
rm -rf .a.tmp
|
||||||
exit -1
|
exit -1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
LC_COLLATE=C sort $SORT_OPT .a.tmp > .b.tmp
|
LC_COLLATE=C sort $SORT_OPT .a.tmp > .b.tmp
|
||||||
|
|
||||||
if cmp --silent -- .a.tmp .b.tmp; then
|
if cmp --silent -- .a.tmp .b.tmp; then
|
||||||
echo ""$2" definitions OK"
|
echo ""$1" tables OK"
|
||||||
else
|
else
|
||||||
echo "error: "$2" definitions are not sorted."
|
echo "error: "$1" tables are not sorted."
|
||||||
diff -y .a.tmp .b.tmp
|
diff -y .a.tmp .b.tmp
|
||||||
|
rm -rf .a.tmp .b.tmp
|
||||||
exit -1
|
exit -1
|
||||||
fi
|
fi
|
||||||
rm -rf .a.tmp .b.tmp
|
rm -rf .a.tmp .b.tmp
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkinstr_quoted_name
|
|
||||||
{
|
|
||||||
CHECK_FILE="$1"
|
|
||||||
|
|
||||||
awk '/'"$2"'/{flag=1;next}/};/{flag=0}flag' "$CHECK_FILE" | \
|
|
||||||
sed -e 's:^ *{$::g' | \
|
|
||||||
sed -e 's:^ *}$::g' | \
|
|
||||||
sed -e 's:.*\"\(.*\)\".*:\1:g' | \
|
|
||||||
sed '/^\s*$/d' > .a.tmp
|
|
||||||
|
|
||||||
if [[ -z $(grep '[^[:space:]]' .a.tmp) ]] ; then
|
|
||||||
echo "error: "$2" table is empty"
|
|
||||||
exit -1
|
|
||||||
fi
|
|
||||||
|
|
||||||
LC_COLLATE=C sort $SORT_OPT .a.tmp > .b.tmp
|
|
||||||
|
|
||||||
if cmp --silent -- .a.tmp .b.tmp; then
|
|
||||||
echo ""$2" definitions OK"
|
|
||||||
else
|
|
||||||
echo "error: "$2" definitions are not sorted."
|
|
||||||
diff -y .a.tmp .b.tmp
|
|
||||||
exit -1
|
|
||||||
fi
|
|
||||||
rm -rf .a.tmp .b.tmp
|
|
||||||
}
|
|
||||||
|
|
||||||
function checkopcodes_quoted_name
|
|
||||||
{
|
|
||||||
CHECK_FILE="$1"
|
|
||||||
|
|
||||||
awk '/'"$2"'/{flag=1;next}/};/{flag=0}flag' "$CHECK_FILE" | \
|
|
||||||
grep "^ *\".*\"," | \
|
|
||||||
sed '/^\s*$/d' > .a.tmp
|
|
||||||
|
|
||||||
if [[ -z $(grep '[^[:space:]]' .a.tmp) ]] ; then
|
|
||||||
echo "error: "$2" table is empty"
|
|
||||||
exit -1
|
|
||||||
fi
|
|
||||||
|
|
||||||
LC_COLLATE=C sort $SORT_OPT .a.tmp > .b.tmp
|
|
||||||
|
|
||||||
if cmp --silent -- .a.tmp .b.tmp; then
|
|
||||||
echo ""$2" definitions OK"
|
|
||||||
else
|
|
||||||
echo "error: "$2" definitions are not sorted."
|
|
||||||
diff -y .a.tmp .b.tmp
|
|
||||||
exit -1
|
|
||||||
fi
|
|
||||||
rm -rf .a.tmp .b.tmp
|
|
||||||
}
|
|
||||||
|
|
||||||
checkinstr_quoted_name ../../src/ca65/instr.c "sizeof \(InsTab6502\.Ins\) \/ sizeof \(InsTab6502\.Ins\[0\]\),"
|
|
||||||
checkinstr_quoted_name ../../src/ca65/instr.c "sizeof \(InsTab6502X\.Ins\) \/ sizeof \(InsTab6502X\.Ins\[0\]\),"
|
|
||||||
checkinstr_quoted_name ../../src/ca65/instr.c "sizeof \(InsTab6502DTV\.Ins\) \/ sizeof \(InsTab6502DTV\.Ins\[0\]\),"
|
|
||||||
checkinstr_quoted_name ../../src/ca65/instr.c "sizeof \(InsTab65C02\.Ins\) \/ sizeof \(InsTab65C02\.Ins\[0\]\),"
|
|
||||||
checkinstr_quoted_name ../../src/ca65/instr.c "sizeof \(InsTab4510\.Ins\) \/ sizeof \(InsTab4510\.Ins\[0\]\),"
|
|
||||||
checkinstr_quoted_name ../../src/ca65/instr.c "sizeof \(InsTab65816\.Ins\) \/ sizeof \(InsTab65816\.Ins\[0\]\),"
|
|
||||||
checkinstr_quoted_name ../../src/ca65/instr.c "sizeof \(InsTabSweet16\.Ins\) \/ sizeof \(InsTabSweet16\.Ins\[0\]\),"
|
|
||||||
checkinstr_quoted_name ../../src/ca65/instr.c "sizeof \(InsTabHuC6280\.Ins\) \/ sizeof \(InsTabHuC6280\.Ins\[0\]\),"
|
|
||||||
|
|
||||||
checkarray_quoted_name ../../src/ca65/scanner.c "} DotKeywords \[\] = {"
|
|
||||||
|
|
||||||
checkarray_quoted_name ../../src/cc65/codeinfo.c "static const FuncInfo FuncInfoTable\[\]"
|
|
||||||
checkarray_quoted_name ../../src/cc65/codeinfo.c "static const ZPInfo ZPInfoTable\[\]"
|
|
||||||
checkarray_quoted_name ../../src/cc65/codeoptutil.c "static const char\* const Tab\[\]"
|
|
||||||
|
|
||||||
checkarray_quoted_name ../../src/cc65/coptstop.c "static const OptFuncDesc FuncTable\[\]"
|
|
||||||
checkarray_quoted_name ../../src/cc65/coptstop.c "static const OptFuncDesc FuncRegATable\[\]"
|
|
||||||
|
|
||||||
checkopcodes_quoted_name ../../src/cc65/opcodes.c "const OPCDesc OPCTable\[OP65_COUNT\] = {"
|
|
||||||
checkarray_quoted_name ../../src/cc65/pragma.c "} Pragmas\[\] = {"
|
|
||||||
checkarray_quoted_name ../../src/cc65/preproc.c "} PPDTypes\[\] = {"
|
|
||||||
checkarray_quoted_name ../../src/cc65/scanner.c "} Keywords \[\] = {"
|
|
||||||
checkarray_quoted_name ../../src/cc65/stdfunc.c "} StdFuncs\[\] = {"
|
|
||||||
|
|
||||||
checkarray_quoted_name ../../src/common/filetype.c "static const FileId TypeTable\[\]"
|
|
||||||
checkarray_quoted_name ../../src/common/target.c "static const TargetEntry TargetMap\[\]"
|
|
||||||
|
|
||||||
checkarray_quoted_name ../../src/dbginfo/dbginfo.c "} KeywordTable\[\] = {"
|
|
||||||
|
|
||||||
checkarray_quoted_name ../../src/sp65/convert.c "static const ConverterMapEntry ConverterMap\[\]"
|
|
||||||
checkarray_quoted_name ../../src/sp65/input.c "static const FileId FormatTable\[\]"
|
|
||||||
checkarray_quoted_name ../../src/sp65/output.c "static const FileId FormatTable\[\]"
|
|
||||||
checkarray_quoted_name ../../src/sp65/palconv.c "static const PaletteMapEntry PaletteMap\[\]"
|
|
||||||
|
|
||||||
|
for N in `grep -rl "BEGIN SORTED.SH" "$CHECK_DIR"`; do
|
||||||
|
checkarray_quoted_name $N
|
||||||
|
done
|
||||||
|
|||||||
77
.github/checks/sorted_codeopt.sh
vendored
77
.github/checks/sorted_codeopt.sh
vendored
@@ -1,42 +1,61 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
OLDCWD=`pwd`
|
OLDCWD=`pwd`
|
||||||
SCRIPT_PATH=`dirname $0`
|
SCRIPT_PATH=`dirname $0`
|
||||||
CHECK_FILE=../../src/cc65/codeopt.c
|
|
||||||
|
CHECK_DIR=../../src
|
||||||
|
|
||||||
SORT_OPT=-u
|
SORT_OPT=-u
|
||||||
|
|
||||||
grep "^static OptFunc " $CHECK_FILE | \
|
function checkarray
|
||||||
sed -e 's:.*"\(.*\)",.*:\1:g' > .a.tmp
|
{
|
||||||
|
CHECK_FILE="$1"
|
||||||
|
START="\\/\\* BEGIN DECL SORTED_CODEOPT.SH \\*\\/"
|
||||||
|
END="\\/\\* END DECL SORTED_CODEOPT.SH \\*\\/"
|
||||||
|
|
||||||
if [[ -z $(grep '[^[:space:]]' .a.tmp) ]] ; then
|
awk '/'"$START"'/{flag=1; count++; next} /'"$END"'/{flag=0;} flag {print count,"##",$0}' "$CHECK_FILE" | \
|
||||||
echo "error: OptFunc table is empty"
|
sed -e 's:\(.*##\).*"\(.*\)",.*:\1\2:g' > .a.tmp
|
||||||
exit -1
|
|
||||||
fi
|
|
||||||
|
|
||||||
LC_COLLATE=C sort $SORT_OPT .a.tmp > .b.tmp
|
if [[ -z $(grep '[^[:space:]]' .a.tmp) ]] ; then
|
||||||
|
echo "error: "$1" table is empty"
|
||||||
|
rm -rf .a.tmp
|
||||||
|
exit -1
|
||||||
|
fi
|
||||||
|
|
||||||
if cmp --silent -- .a.tmp .b.tmp; then
|
LC_COLLATE=C sort $SORT_OPT .a.tmp > .b.tmp
|
||||||
echo "static OptFunc definitions OK"
|
|
||||||
else
|
|
||||||
echo "error: static OptFunc definitions are not sorted."
|
|
||||||
diff -y .a.tmp .b.tmp
|
|
||||||
exit -1
|
|
||||||
fi
|
|
||||||
|
|
||||||
awk '/static OptFunc\* OptFuncs\[\] = {/{flag=1;next}/}/{flag=0}flag' $CHECK_FILE | \
|
if cmp --silent -- .a.tmp .b.tmp; then
|
||||||
sed -e 's:.*&D\(.*\),:\1:g' > .a.tmp
|
echo ""$1" decls OK"
|
||||||
|
else
|
||||||
|
echo "error: "$1" decls are not sorted."
|
||||||
|
diff -y .a.tmp .b.tmp
|
||||||
|
rm -rf .a.tmp .b.tmp
|
||||||
|
exit -1
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -z $(grep '[^[:space:]]' .a.tmp) ]] ; then
|
START="\\/\\* BEGIN SORTED_CODEOPT.SH \\*\\/"
|
||||||
echo "error: OptFuncs table is empty"
|
END="\\/\\* END SORTED_CODEOPT.SH \\*\\/"
|
||||||
exit -1
|
awk '/'"$START"'/{flag=1; count++; next} /'"$END"'/{flag=0;} flag {print count,"##",$0}' "$CHECK_FILE" | \
|
||||||
fi
|
sed -e 's:\(.*##\).*&D\(.*\),.*:\1\2:g' > .a.tmp
|
||||||
|
|
||||||
if cmp --silent -- .a.tmp .b.tmp; then
|
if [[ -z $(grep '[^[:space:]]' .a.tmp) ]] ; then
|
||||||
echo "static OptFuncs* OptFuncs[] definitions OK"
|
echo "error: "$1" table is empty"
|
||||||
else
|
rm -rf .a.tmp
|
||||||
echo "error: static OptFuncs* OptFuncs[] definitions are not sorted."
|
exit -1
|
||||||
diff -y .a.tmp .b.tmp
|
fi
|
||||||
exit -1
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -rf .a.tmp .b.tmp
|
if cmp --silent -- .a.tmp .b.tmp; then
|
||||||
|
echo ""$1" tables OK"
|
||||||
|
else
|
||||||
|
echo "error: "$1" tables are not sorted."
|
||||||
|
diff -y .a.tmp .b.tmp
|
||||||
|
rm -rf .a.tmp .b.tmp
|
||||||
|
exit -1
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -rf .a.tmp .b.tmp
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
for N in `grep -rl "BEGIN DECL SORTED_CODEOPT.SH" "$CHECK_DIR"`; do
|
||||||
|
checkarray $N
|
||||||
|
done
|
||||||
|
|||||||
42
.github/checks/sorted_opcodes.sh
vendored
Executable file
42
.github/checks/sorted_opcodes.sh
vendored
Executable file
@@ -0,0 +1,42 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
OLDCWD=`pwd`
|
||||||
|
SCRIPT_PATH=`dirname $0`
|
||||||
|
|
||||||
|
CHECK_DIR=../../src
|
||||||
|
|
||||||
|
SORT_OPT=-u
|
||||||
|
|
||||||
|
function checkarray_quoted_name
|
||||||
|
{
|
||||||
|
CHECK_FILE="$1"
|
||||||
|
START="\\/\\* BEGIN SORTED_OPCODES.SH \\*\\/"
|
||||||
|
END="\\/\\* END SORTED_OPCODES.SH \\*\\/"
|
||||||
|
|
||||||
|
awk '/'"$START"'/{flag=1; count++; next} /'"$END"'/{flag=0;} flag {print count,"##",$0}' "$CHECK_FILE" | \
|
||||||
|
sed 's:/\*.*::g' | \
|
||||||
|
grep '".*",' | \
|
||||||
|
sed -e 's:\(.*\) ##.*\"\(.*\)\".*:\1##\2:g' > .a.tmp
|
||||||
|
|
||||||
|
if [[ -z $(grep '[^[:space:]]' .a.tmp) ]] ; then
|
||||||
|
echo "error: "$1" table is empty"
|
||||||
|
rm -rf .a.tmp
|
||||||
|
exit -1
|
||||||
|
fi
|
||||||
|
|
||||||
|
LC_COLLATE=C sort $SORT_OPT .a.tmp > .b.tmp
|
||||||
|
|
||||||
|
if cmp --silent -- .a.tmp .b.tmp; then
|
||||||
|
echo ""$1" tables OK"
|
||||||
|
else
|
||||||
|
echo "error: "$1" tables are not sorted."
|
||||||
|
diff -y .a.tmp .b.tmp
|
||||||
|
rm -rf .a.tmp .b.tmp
|
||||||
|
exit -1
|
||||||
|
fi
|
||||||
|
rm -rf .a.tmp .b.tmp
|
||||||
|
}
|
||||||
|
|
||||||
|
for N in `grep -rl "BEGIN SORTED_OPCODES.SH" "$CHECK_DIR"`; do
|
||||||
|
checkarray_quoted_name $N
|
||||||
|
done
|
||||||
|
|
||||||
@@ -172,6 +172,7 @@ static const struct {
|
|||||||
/* CAUTION: table must be sorted for bsearch */
|
/* CAUTION: table must be sorted for bsearch */
|
||||||
sizeof (InsTab6502.Ins) / sizeof (InsTab6502.Ins[0]),
|
sizeof (InsTab6502.Ins) / sizeof (InsTab6502.Ins[0]),
|
||||||
{
|
{
|
||||||
|
/* BEGIN SORTED.SH */
|
||||||
{ "ADC", 0x080A26C, 0x60, 0, PutAll },
|
{ "ADC", 0x080A26C, 0x60, 0, PutAll },
|
||||||
{ "AND", 0x080A26C, 0x20, 0, PutAll },
|
{ "AND", 0x080A26C, 0x20, 0, PutAll },
|
||||||
{ "ASL", 0x000006e, 0x02, 1, PutAll },
|
{ "ASL", 0x000006e, 0x02, 1, PutAll },
|
||||||
@@ -228,6 +229,7 @@ static const struct {
|
|||||||
{ "TXA", 0x0000001, 0x8a, 0, PutAll },
|
{ "TXA", 0x0000001, 0x8a, 0, PutAll },
|
||||||
{ "TXS", 0x0000001, 0x9a, 0, PutAll },
|
{ "TXS", 0x0000001, 0x9a, 0, PutAll },
|
||||||
{ "TYA", 0x0000001, 0x98, 0, PutAll }
|
{ "TYA", 0x0000001, 0x98, 0, PutAll }
|
||||||
|
/* END SORTED.SH */
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -239,6 +241,7 @@ static const struct {
|
|||||||
/* CAUTION: table must be sorted for bsearch */
|
/* CAUTION: table must be sorted for bsearch */
|
||||||
sizeof (InsTab6502X.Ins) / sizeof (InsTab6502X.Ins[0]),
|
sizeof (InsTab6502X.Ins) / sizeof (InsTab6502X.Ins[0]),
|
||||||
{
|
{
|
||||||
|
/* BEGIN SORTED.SH */
|
||||||
{ "ADC", 0x080A26C, 0x60, 0, PutAll },
|
{ "ADC", 0x080A26C, 0x60, 0, PutAll },
|
||||||
{ "ALR", 0x0800000, 0x4B, 0, PutAll }, /* X */
|
{ "ALR", 0x0800000, 0x4B, 0, PutAll }, /* X */
|
||||||
{ "ANC", 0x0800000, 0x0B, 0, PutAll }, /* X */
|
{ "ANC", 0x0800000, 0x0B, 0, PutAll }, /* X */
|
||||||
@@ -314,6 +317,7 @@ static const struct {
|
|||||||
{ "TXA", 0x0000001, 0x8a, 0, PutAll },
|
{ "TXA", 0x0000001, 0x8a, 0, PutAll },
|
||||||
{ "TXS", 0x0000001, 0x9a, 0, PutAll },
|
{ "TXS", 0x0000001, 0x9a, 0, PutAll },
|
||||||
{ "TYA", 0x0000001, 0x98, 0, PutAll }
|
{ "TYA", 0x0000001, 0x98, 0, PutAll }
|
||||||
|
/* END SORTED.SH */
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -329,6 +333,7 @@ static const struct {
|
|||||||
/* CAUTION: table must be sorted for bsearch */
|
/* CAUTION: table must be sorted for bsearch */
|
||||||
sizeof (InsTab6502DTV.Ins) / sizeof (InsTab6502DTV.Ins[0]),
|
sizeof (InsTab6502DTV.Ins) / sizeof (InsTab6502DTV.Ins[0]),
|
||||||
{
|
{
|
||||||
|
/* BEGIN SORTED.SH */
|
||||||
{ "ADC", 0x080A26C, 0x60, 0, PutAll },
|
{ "ADC", 0x080A26C, 0x60, 0, PutAll },
|
||||||
{ "ALR", 0x0800000, 0x4B, 0, PutAll }, /* X */
|
{ "ALR", 0x0800000, 0x4B, 0, PutAll }, /* X */
|
||||||
{ "ANC", 0x0800000, 0x0B, 0, PutAll }, /* X */
|
{ "ANC", 0x0800000, 0x0B, 0, PutAll }, /* X */
|
||||||
@@ -400,6 +405,7 @@ static const struct {
|
|||||||
{ "TXA", 0x0000001, 0x8a, 0, PutAll },
|
{ "TXA", 0x0000001, 0x8a, 0, PutAll },
|
||||||
{ "TXS", 0x0000001, 0x9a, 0, PutAll },
|
{ "TXS", 0x0000001, 0x9a, 0, PutAll },
|
||||||
{ "TYA", 0x0000001, 0x98, 0, PutAll }
|
{ "TYA", 0x0000001, 0x98, 0, PutAll }
|
||||||
|
/* END SORTED.SH */
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -411,6 +417,7 @@ static const struct {
|
|||||||
/* CAUTION: table must be sorted for bsearch */
|
/* CAUTION: table must be sorted for bsearch */
|
||||||
sizeof (InsTab65SC02.Ins) / sizeof (InsTab65SC02.Ins[0]),
|
sizeof (InsTab65SC02.Ins) / sizeof (InsTab65SC02.Ins[0]),
|
||||||
{
|
{
|
||||||
|
/* BEGIN SORTED.SH */
|
||||||
{ "ADC", 0x080A66C, 0x60, 0, PutAll },
|
{ "ADC", 0x080A66C, 0x60, 0, PutAll },
|
||||||
{ "AND", 0x080A66C, 0x20, 0, PutAll },
|
{ "AND", 0x080A66C, 0x20, 0, PutAll },
|
||||||
{ "ASL", 0x000006e, 0x02, 1, PutAll },
|
{ "ASL", 0x000006e, 0x02, 1, PutAll },
|
||||||
@@ -477,6 +484,7 @@ static const struct {
|
|||||||
{ "TXA", 0x0000001, 0x8a, 0, PutAll },
|
{ "TXA", 0x0000001, 0x8a, 0, PutAll },
|
||||||
{ "TXS", 0x0000001, 0x9a, 0, PutAll },
|
{ "TXS", 0x0000001, 0x9a, 0, PutAll },
|
||||||
{ "TYA", 0x0000001, 0x98, 0, PutAll }
|
{ "TYA", 0x0000001, 0x98, 0, PutAll }
|
||||||
|
/* END SORTED.SH */
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -488,6 +496,7 @@ static const struct {
|
|||||||
/* CAUTION: table must be sorted for bsearch */
|
/* CAUTION: table must be sorted for bsearch */
|
||||||
sizeof (InsTab65C02.Ins) / sizeof (InsTab65C02.Ins[0]),
|
sizeof (InsTab65C02.Ins) / sizeof (InsTab65C02.Ins[0]),
|
||||||
{
|
{
|
||||||
|
/* BEGIN SORTED.SH */
|
||||||
{ "ADC", 0x080A66C, 0x60, 0, PutAll },
|
{ "ADC", 0x080A66C, 0x60, 0, PutAll },
|
||||||
{ "AND", 0x080A66C, 0x20, 0, PutAll },
|
{ "AND", 0x080A66C, 0x20, 0, PutAll },
|
||||||
{ "ASL", 0x000006e, 0x02, 1, PutAll },
|
{ "ASL", 0x000006e, 0x02, 1, PutAll },
|
||||||
@@ -588,6 +597,7 @@ static const struct {
|
|||||||
{ "TXS", 0x0000001, 0x9a, 0, PutAll },
|
{ "TXS", 0x0000001, 0x9a, 0, PutAll },
|
||||||
{ "TYA", 0x0000001, 0x98, 0, PutAll },
|
{ "TYA", 0x0000001, 0x98, 0, PutAll },
|
||||||
{ "WAI", 0x0000001, 0xcb, 0, PutAll }
|
{ "WAI", 0x0000001, 0xcb, 0, PutAll }
|
||||||
|
/* END SORTED.SH */
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -599,6 +609,7 @@ static const struct {
|
|||||||
/* CAUTION: table must be sorted for bsearch */
|
/* CAUTION: table must be sorted for bsearch */
|
||||||
sizeof (InsTab4510.Ins) / sizeof (InsTab4510.Ins[0]),
|
sizeof (InsTab4510.Ins) / sizeof (InsTab4510.Ins[0]),
|
||||||
{
|
{
|
||||||
|
/* BEGIN SORTED.SH */
|
||||||
{ "ADC", 0x080A66C, 0x60, 0, PutAll },
|
{ "ADC", 0x080A66C, 0x60, 0, PutAll },
|
||||||
{ "AND", 0x080A66C, 0x20, 0, PutAll },
|
{ "AND", 0x080A66C, 0x20, 0, PutAll },
|
||||||
{ "ASL", 0x000006e, 0x02, 1, PutAll },
|
{ "ASL", 0x000006e, 0x02, 1, PutAll },
|
||||||
@@ -732,6 +743,7 @@ static const struct {
|
|||||||
{ "TYA", 0x0000001, 0x98, 0, PutAll },
|
{ "TYA", 0x0000001, 0x98, 0, PutAll },
|
||||||
{ "TYS", 0x0000001, 0x2b, 0, PutAll },
|
{ "TYS", 0x0000001, 0x2b, 0, PutAll },
|
||||||
{ "TZA", 0x0000001, 0x6b, 0, PutAll },
|
{ "TZA", 0x0000001, 0x6b, 0, PutAll },
|
||||||
|
/* END SORTED.SH */
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -743,6 +755,7 @@ static const struct {
|
|||||||
/* CAUTION: table must be sorted for bsearch */
|
/* CAUTION: table must be sorted for bsearch */
|
||||||
sizeof (InsTab65816.Ins) / sizeof (InsTab65816.Ins[0]),
|
sizeof (InsTab65816.Ins) / sizeof (InsTab65816.Ins[0]),
|
||||||
{
|
{
|
||||||
|
/* BEGIN SORTED.SH */
|
||||||
{ "ADC", 0x0b8f6fc, 0x60, 0, PutAll },
|
{ "ADC", 0x0b8f6fc, 0x60, 0, PutAll },
|
||||||
{ "AND", 0x0b8f6fc, 0x20, 0, PutAll },
|
{ "AND", 0x0b8f6fc, 0x20, 0, PutAll },
|
||||||
{ "ASL", 0x000006e, 0x02, 1, PutAll },
|
{ "ASL", 0x000006e, 0x02, 1, PutAll },
|
||||||
@@ -843,6 +856,7 @@ static const struct {
|
|||||||
{ "WDM", 0x0800004, 0x42, 6, PutAll },
|
{ "WDM", 0x0800004, 0x42, 6, PutAll },
|
||||||
{ "XBA", 0x0000001, 0xeb, 0, PutAll },
|
{ "XBA", 0x0000001, 0xeb, 0, PutAll },
|
||||||
{ "XCE", 0x0000001, 0xfb, 0, PutAll }
|
{ "XCE", 0x0000001, 0xfb, 0, PutAll }
|
||||||
|
/* END SORTED.SH */
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -854,6 +868,7 @@ static const struct {
|
|||||||
/* CAUTION: table must be sorted for bsearch */
|
/* CAUTION: table must be sorted for bsearch */
|
||||||
sizeof (InsTabSweet16.Ins) / sizeof (InsTabSweet16.Ins[0]),
|
sizeof (InsTabSweet16.Ins) / sizeof (InsTabSweet16.Ins[0]),
|
||||||
{
|
{
|
||||||
|
/* BEGIN SORTED.SH */
|
||||||
{ "ADD", AMSW16_REG, 0xA0, 0, PutSweet16 },
|
{ "ADD", AMSW16_REG, 0xA0, 0, PutSweet16 },
|
||||||
{ "BC", AMSW16_BRA, 0x03, 0, PutSweet16Branch },
|
{ "BC", AMSW16_BRA, 0x03, 0, PutSweet16Branch },
|
||||||
{ "BK", AMSW16_IMP, 0x0A, 0, PutSweet16 },
|
{ "BK", AMSW16_IMP, 0x0A, 0, PutSweet16 },
|
||||||
@@ -880,6 +895,7 @@ static const struct {
|
|||||||
{ "STD", AMSW16_IND, 0x70, 0, PutSweet16 },
|
{ "STD", AMSW16_IND, 0x70, 0, PutSweet16 },
|
||||||
{ "STP", AMSW16_IND, 0x90, 0, PutSweet16 },
|
{ "STP", AMSW16_IND, 0x90, 0, PutSweet16 },
|
||||||
{ "SUB", AMSW16_REG, 0xB0, 0, PutSweet16 },
|
{ "SUB", AMSW16_REG, 0xB0, 0, PutSweet16 },
|
||||||
|
/* END SORTED.SH */
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -891,6 +907,7 @@ static const struct {
|
|||||||
/* CAUTION: table must be sorted for bsearch */
|
/* CAUTION: table must be sorted for bsearch */
|
||||||
sizeof (InsTabHuC6280.Ins) / sizeof (InsTabHuC6280.Ins[0]),
|
sizeof (InsTabHuC6280.Ins) / sizeof (InsTabHuC6280.Ins[0]),
|
||||||
{
|
{
|
||||||
|
/* BEGIN SORTED.SH */
|
||||||
{ "ADC", 0x080A66C, 0x60, 0, PutAll },
|
{ "ADC", 0x080A66C, 0x60, 0, PutAll },
|
||||||
{ "AND", 0x080A66C, 0x20, 0, PutAll },
|
{ "AND", 0x080A66C, 0x20, 0, PutAll },
|
||||||
{ "ASL", 0x000006e, 0x02, 1, PutAll },
|
{ "ASL", 0x000006e, 0x02, 1, PutAll },
|
||||||
@@ -1026,6 +1043,7 @@ static const struct {
|
|||||||
{ "TXA", 0x0000001, 0x8a, 0, PutAll },
|
{ "TXA", 0x0000001, 0x8a, 0, PutAll },
|
||||||
{ "TXS", 0x0000001, 0x9a, 0, PutAll },
|
{ "TXS", 0x0000001, 0x9a, 0, PutAll },
|
||||||
{ "TYA", 0x0000001, 0x98, 0, PutAll }
|
{ "TYA", 0x0000001, 0x98, 0, PutAll }
|
||||||
|
/* END SORTED.SH */
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -136,6 +136,7 @@ struct DotKeyword {
|
|||||||
const char* Key; /* MUST be first field */
|
const char* Key; /* MUST be first field */
|
||||||
token_t Tok;
|
token_t Tok;
|
||||||
} DotKeywords [] = {
|
} DotKeywords [] = {
|
||||||
|
/* BEGIN SORTED.SH */
|
||||||
{ ".A16", TOK_A16 },
|
{ ".A16", TOK_A16 },
|
||||||
{ ".A8", TOK_A8 },
|
{ ".A8", TOK_A8 },
|
||||||
{ ".ADDR", TOK_ADDR },
|
{ ".ADDR", TOK_ADDR },
|
||||||
@@ -307,6 +308,7 @@ struct DotKeyword {
|
|||||||
{ ".XMATCH", TOK_XMATCH },
|
{ ".XMATCH", TOK_XMATCH },
|
||||||
{ ".XOR", TOK_BOOLXOR },
|
{ ".XOR", TOK_BOOLXOR },
|
||||||
{ ".ZEROPAGE", TOK_ZEROPAGE },
|
{ ".ZEROPAGE", TOK_ZEROPAGE },
|
||||||
|
/* END SORTED.SH */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -92,6 +92,7 @@ struct FuncInfo {
|
|||||||
*/
|
*/
|
||||||
/* CAUTION: table must be sorted for bsearch */
|
/* CAUTION: table must be sorted for bsearch */
|
||||||
static const FuncInfo FuncInfoTable[] = {
|
static const FuncInfo FuncInfoTable[] = {
|
||||||
|
/* BEGIN SORTED.SH */
|
||||||
{ "addeq0sp", SLV_TOP | REG_AX, PSTATE_ALL | REG_AXY },
|
{ "addeq0sp", SLV_TOP | REG_AX, PSTATE_ALL | REG_AXY },
|
||||||
{ "addeqysp", SLV_IND | REG_AXY, PSTATE_ALL | REG_AXY },
|
{ "addeqysp", SLV_IND | REG_AXY, PSTATE_ALL | REG_AXY },
|
||||||
{ "addysp", REG_SP | REG_Y, PSTATE_ALL | REG_SP },
|
{ "addysp", REG_SP | REG_Y, PSTATE_ALL | REG_SP },
|
||||||
@@ -377,12 +378,14 @@ static const FuncInfo FuncInfoTable[] = {
|
|||||||
{ "tosxoreax", SLV_TOP | REG_EAX, PSTATE_ALL | REG_SP | REG_EAXY | REG_TMP1 },
|
{ "tosxoreax", SLV_TOP | REG_EAX, PSTATE_ALL | REG_SP | REG_EAXY | REG_TMP1 },
|
||||||
{ "tsteax", REG_EAX, PSTATE_ALL | REG_Y },
|
{ "tsteax", REG_EAX, PSTATE_ALL | REG_Y },
|
||||||
{ "utsteax", REG_EAX, PSTATE_ALL | REG_Y },
|
{ "utsteax", REG_EAX, PSTATE_ALL | REG_Y },
|
||||||
|
/* END SORTED.SH */
|
||||||
};
|
};
|
||||||
#define FuncInfoCount (sizeof(FuncInfoTable) / sizeof(FuncInfoTable[0]))
|
#define FuncInfoCount (sizeof(FuncInfoTable) / sizeof(FuncInfoTable[0]))
|
||||||
|
|
||||||
/* Table with names of zero page locations used by the compiler */
|
/* Table with names of zero page locations used by the compiler */
|
||||||
/* CAUTION: table must be sorted for bsearch */
|
/* CAUTION: table must be sorted for bsearch */
|
||||||
static const ZPInfo ZPInfoTable[] = {
|
static const ZPInfo ZPInfoTable[] = {
|
||||||
|
/* BEGIN SORTED.SH */
|
||||||
{ 0, "ptr1", 2, REG_PTR1_LO, REG_PTR1 },
|
{ 0, "ptr1", 2, REG_PTR1_LO, REG_PTR1 },
|
||||||
{ 0, "ptr1+1", 1, REG_PTR1_HI, REG_PTR1 },
|
{ 0, "ptr1+1", 1, REG_PTR1_HI, REG_PTR1 },
|
||||||
{ 0, "ptr2", 2, REG_PTR2_LO, REG_PTR2 },
|
{ 0, "ptr2", 2, REG_PTR2_LO, REG_PTR2 },
|
||||||
@@ -400,6 +403,7 @@ static const ZPInfo ZPInfoTable[] = {
|
|||||||
{ 0, "tmp2", 1, REG_NONE, REG_NONE },
|
{ 0, "tmp2", 1, REG_NONE, REG_NONE },
|
||||||
{ 0, "tmp3", 1, REG_NONE, REG_NONE },
|
{ 0, "tmp3", 1, REG_NONE, REG_NONE },
|
||||||
{ 0, "tmp4", 1, REG_NONE, REG_NONE },
|
{ 0, "tmp4", 1, REG_NONE, REG_NONE },
|
||||||
|
/* END SORTED.SH */
|
||||||
};
|
};
|
||||||
#define ZPInfoCount (sizeof(ZPInfoTable) / sizeof(ZPInfoTable[0]))
|
#define ZPInfoCount (sizeof(ZPInfoTable) / sizeof(ZPInfoTable[0]))
|
||||||
|
|
||||||
|
|||||||
@@ -103,6 +103,7 @@ struct OptFunc {
|
|||||||
|
|
||||||
/* A list of all the function descriptions */
|
/* A list of all the function descriptions */
|
||||||
/* CAUTION: should be sorted by "name" */
|
/* CAUTION: should be sorted by "name" */
|
||||||
|
/* BEGIN DECL SORTED_CODEOPT.SH */
|
||||||
static OptFunc DOpt65C02BitOps = { Opt65C02BitOps, "Opt65C02BitOps", 66, 0, 0, 0, 0, 0 };
|
static OptFunc DOpt65C02BitOps = { Opt65C02BitOps, "Opt65C02BitOps", 66, 0, 0, 0, 0, 0 };
|
||||||
static OptFunc DOpt65C02Ind = { Opt65C02Ind, "Opt65C02Ind", 100, 0, 0, 0, 0, 0 };
|
static OptFunc DOpt65C02Ind = { Opt65C02Ind, "Opt65C02Ind", 100, 0, 0, 0, 0, 0 };
|
||||||
static OptFunc DOpt65C02Stores = { Opt65C02Stores, "Opt65C02Stores", 100, 0, 0, 0, 0, 0 };
|
static OptFunc DOpt65C02Stores = { Opt65C02Stores, "Opt65C02Stores", 100, 0, 0, 0, 0, 0 };
|
||||||
@@ -215,11 +216,13 @@ static OptFunc DOptTransfers3 = { OptTransfers3, "OptTransfers3", 65, 0,
|
|||||||
static OptFunc DOptTransfers4 = { OptTransfers4, "OptTransfers4", 65, 0, 0, 0, 0, 0 };
|
static OptFunc DOptTransfers4 = { OptTransfers4, "OptTransfers4", 65, 0, 0, 0, 0, 0 };
|
||||||
static OptFunc DOptUnusedLoads = { OptUnusedLoads, "OptUnusedLoads", 0, 0, 0, 0, 0, 0 };
|
static OptFunc DOptUnusedLoads = { OptUnusedLoads, "OptUnusedLoads", 0, 0, 0, 0, 0, 0 };
|
||||||
static OptFunc DOptUnusedStores = { OptUnusedStores, "OptUnusedStores", 0, 0, 0, 0, 0, 0 };
|
static OptFunc DOptUnusedStores = { OptUnusedStores, "OptUnusedStores", 0, 0, 0, 0, 0, 0 };
|
||||||
|
/* END DECL SORTED_CODEOPT.SH */
|
||||||
|
|
||||||
|
|
||||||
/* Table containing all the steps in alphabetical order */
|
/* Table containing all the steps in alphabetical order */
|
||||||
/* CAUTION: table must be sorted for bsearch */
|
/* CAUTION: table must be sorted for bsearch */
|
||||||
static OptFunc* OptFuncs[] = {
|
static OptFunc* OptFuncs[] = {
|
||||||
|
/* BEGIN SORTED_CODEOPT.SH */
|
||||||
&DOpt65C02BitOps,
|
&DOpt65C02BitOps,
|
||||||
&DOpt65C02Ind,
|
&DOpt65C02Ind,
|
||||||
&DOpt65C02Stores,
|
&DOpt65C02Stores,
|
||||||
@@ -332,6 +335,7 @@ static OptFunc* OptFuncs[] = {
|
|||||||
&DOptTransfers4,
|
&DOptTransfers4,
|
||||||
&DOptUnusedLoads,
|
&DOptUnusedLoads,
|
||||||
&DOptUnusedStores,
|
&DOptUnusedStores,
|
||||||
|
/* END SORTED_CODEOPT.SH */
|
||||||
};
|
};
|
||||||
#define OPTFUNC_COUNT (sizeof(OptFuncs) / sizeof(OptFuncs[0]))
|
#define OPTFUNC_COUNT (sizeof(OptFuncs) / sizeof(OptFuncs[0]))
|
||||||
|
|
||||||
|
|||||||
@@ -1227,7 +1227,9 @@ static int CmpHarmless (const void* Key, const void* Entry)
|
|||||||
|
|
||||||
/* CAUTION: table must be sorted for bsearch */
|
/* CAUTION: table must be sorted for bsearch */
|
||||||
static const char* const Tab[] = {
|
static const char* const Tab[] = {
|
||||||
|
/* BEGIN SORTED.SH */
|
||||||
"_abs",
|
"_abs",
|
||||||
|
/* END SORTED.SH */
|
||||||
};
|
};
|
||||||
|
|
||||||
int HarmlessCall (const CodeEntry* E, int PushedBytes)
|
int HarmlessCall (const CodeEntry* E, int PushedBytes)
|
||||||
|
|||||||
@@ -1466,6 +1466,7 @@ static unsigned Opt_a_tosxor (StackOpData* D)
|
|||||||
|
|
||||||
/* CAUTION: table must be sorted for bsearch */
|
/* CAUTION: table must be sorted for bsearch */
|
||||||
static const OptFuncDesc FuncTable[] = {
|
static const OptFuncDesc FuncTable[] = {
|
||||||
|
/* BEGIN SORTED.SH */
|
||||||
{ "___bzero", Opt___bzero, REG_NONE, OP_X_ZERO | OP_A_KNOWN },
|
{ "___bzero", Opt___bzero, REG_NONE, OP_X_ZERO | OP_A_KNOWN },
|
||||||
{ "staspidx", Opt_staspidx, REG_NONE, OP_NONE },
|
{ "staspidx", Opt_staspidx, REG_NONE, OP_NONE },
|
||||||
{ "staxspidx", Opt_staxspidx, REG_AX, OP_NONE },
|
{ "staxspidx", Opt_staxspidx, REG_AX, OP_NONE },
|
||||||
@@ -1486,10 +1487,12 @@ static const OptFuncDesc FuncTable[] = {
|
|||||||
{ "tosuleax", Opt_tosuleax, REG_NONE, OP_RHS_REMOVE_DIRECT | OP_RHS_LOAD_DIRECT },
|
{ "tosuleax", Opt_tosuleax, REG_NONE, OP_RHS_REMOVE_DIRECT | OP_RHS_LOAD_DIRECT },
|
||||||
{ "tosultax", Opt_tosultax, REG_NONE, OP_RHS_REMOVE_DIRECT | OP_RHS_LOAD_DIRECT },
|
{ "tosultax", Opt_tosultax, REG_NONE, OP_RHS_REMOVE_DIRECT | OP_RHS_LOAD_DIRECT },
|
||||||
{ "tosxorax", Opt_tosxorax, REG_NONE, OP_NONE },
|
{ "tosxorax", Opt_tosxorax, REG_NONE, OP_NONE },
|
||||||
|
/* END SORTED.SH */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* CAUTION: table must be sorted for bsearch */
|
/* CAUTION: table must be sorted for bsearch */
|
||||||
static const OptFuncDesc FuncRegATable[] = {
|
static const OptFuncDesc FuncRegATable[] = {
|
||||||
|
/* BEGIN SORTED.SH */
|
||||||
{ "tosandax", Opt_a_tosand, REG_NONE, OP_RHS_REMOVE_DIRECT | OP_RHS_LOAD_DIRECT },
|
{ "tosandax", Opt_a_tosand, REG_NONE, OP_RHS_REMOVE_DIRECT | OP_RHS_LOAD_DIRECT },
|
||||||
{ "toseqax", Opt_a_toseq, REG_NONE, OP_NONE },
|
{ "toseqax", Opt_a_toseq, REG_NONE, OP_NONE },
|
||||||
{ "tosgeax", Opt_a_tosuge, REG_NONE, OP_NONE },
|
{ "tosgeax", Opt_a_tosuge, REG_NONE, OP_NONE },
|
||||||
@@ -1505,6 +1508,7 @@ static const OptFuncDesc FuncRegATable[] = {
|
|||||||
{ "tosuleax", Opt_a_tosule, REG_NONE, OP_NONE },
|
{ "tosuleax", Opt_a_tosule, REG_NONE, OP_NONE },
|
||||||
{ "tosultax", Opt_a_tosult, REG_NONE, OP_NONE },
|
{ "tosultax", Opt_a_tosult, REG_NONE, OP_NONE },
|
||||||
{ "tosxorax", Opt_a_tosxor, REG_NONE, OP_RHS_REMOVE_DIRECT | OP_RHS_LOAD_DIRECT },
|
{ "tosxorax", Opt_a_tosxor, REG_NONE, OP_RHS_REMOVE_DIRECT | OP_RHS_LOAD_DIRECT },
|
||||||
|
/* END SORTED.SH */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define FUNC_COUNT(Table) (sizeof(Table) / sizeof(Table[0]))
|
#define FUNC_COUNT(Table) (sizeof(Table) / sizeof(Table[0]))
|
||||||
|
|||||||
@@ -59,6 +59,8 @@
|
|||||||
const OPCDesc OPCTable[OP65_COUNT] = {
|
const OPCDesc OPCTable[OP65_COUNT] = {
|
||||||
|
|
||||||
/* 65XX opcodes */
|
/* 65XX opcodes */
|
||||||
|
|
||||||
|
/* BEGIN SORTED_OPCODES.SH */
|
||||||
{ OP65_ADC, /* opcode */
|
{ OP65_ADC, /* opcode */
|
||||||
"adc", /* mnemonic */
|
"adc", /* mnemonic */
|
||||||
0, /* size */
|
0, /* size */
|
||||||
@@ -587,6 +589,7 @@ const OPCDesc OPCTable[OP65_COUNT] = {
|
|||||||
REG_Y, /* use */
|
REG_Y, /* use */
|
||||||
REG_A | PSTATE_ZN /* chg */
|
REG_A | PSTATE_ZN /* chg */
|
||||||
},
|
},
|
||||||
|
/* END SORTED_OPCODES.SH */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -94,6 +94,7 @@ static const struct Pragma {
|
|||||||
const char* Key; /* Keyword */
|
const char* Key; /* Keyword */
|
||||||
pragma_t Tok; /* Token */
|
pragma_t Tok; /* Token */
|
||||||
} Pragmas[] = {
|
} Pragmas[] = {
|
||||||
|
/* BEGIN SORTED.SH */
|
||||||
{ "align", PRAGMA_ALIGN },
|
{ "align", PRAGMA_ALIGN },
|
||||||
{ "allow-eager-inline", PRAGMA_ALLOW_EAGER_INLINE },
|
{ "allow-eager-inline", PRAGMA_ALLOW_EAGER_INLINE },
|
||||||
{ "allow_eager_inline", PRAGMA_ALLOW_EAGER_INLINE },
|
{ "allow_eager_inline", PRAGMA_ALLOW_EAGER_INLINE },
|
||||||
@@ -128,6 +129,7 @@ static const struct Pragma {
|
|||||||
{ "writable-strings", PRAGMA_WRITABLE_STRINGS },
|
{ "writable-strings", PRAGMA_WRITABLE_STRINGS },
|
||||||
{ "writable_strings", PRAGMA_WRITABLE_STRINGS },
|
{ "writable_strings", PRAGMA_WRITABLE_STRINGS },
|
||||||
{ "zpsym", PRAGMA_ZPSYM },
|
{ "zpsym", PRAGMA_ZPSYM },
|
||||||
|
/* END SORTED.SH */
|
||||||
};
|
};
|
||||||
#define PRAGMA_COUNT (sizeof (Pragmas) / sizeof (Pragmas[0]))
|
#define PRAGMA_COUNT (sizeof (Pragmas) / sizeof (Pragmas[0]))
|
||||||
|
|
||||||
|
|||||||
@@ -221,6 +221,7 @@ static const struct PPDType {
|
|||||||
const char* Tok; /* Token */
|
const char* Tok; /* Token */
|
||||||
ppdirective_t Type; /* Type */
|
ppdirective_t Type; /* Type */
|
||||||
} PPDTypes[] = {
|
} PPDTypes[] = {
|
||||||
|
/* BEGIN SORTED.SH */
|
||||||
{ "define", PPD_DEFINE },
|
{ "define", PPD_DEFINE },
|
||||||
{ "elif", PPD_ELIF },
|
{ "elif", PPD_ELIF },
|
||||||
{ "else", PPD_ELSE },
|
{ "else", PPD_ELSE },
|
||||||
@@ -234,6 +235,7 @@ static const struct PPDType {
|
|||||||
{ "pragma", PPD_PRAGMA },
|
{ "pragma", PPD_PRAGMA },
|
||||||
{ "undef", PPD_UNDEF },
|
{ "undef", PPD_UNDEF },
|
||||||
{ "warning", PPD_WARNING },
|
{ "warning", PPD_WARNING },
|
||||||
|
/* END SORTED.SH */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Number of preprocessor directive types */
|
/* Number of preprocessor directive types */
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ static const struct Keyword {
|
|||||||
unsigned char Tok; /* The token */
|
unsigned char Tok; /* The token */
|
||||||
unsigned char Std; /* Token supported in which standards? */
|
unsigned char Std; /* Token supported in which standards? */
|
||||||
} Keywords [] = {
|
} Keywords [] = {
|
||||||
|
/* BEGIN SORTED.SH */
|
||||||
{ "_Pragma", TOK_PRAGMA, TT_C89 | TT_C99 | TT_CC65 }, /* !! */
|
{ "_Pragma", TOK_PRAGMA, TT_C89 | TT_C99 | TT_CC65 }, /* !! */
|
||||||
{ "_Static_assert", TOK_STATIC_ASSERT, TT_CC65 }, /* C11 */
|
{ "_Static_assert", TOK_STATIC_ASSERT, TT_CC65 }, /* C11 */
|
||||||
{ "__AX__", TOK_AX, TT_C89 | TT_C99 | TT_CC65 },
|
{ "__AX__", TOK_AX, TT_C89 | TT_C99 | TT_CC65 },
|
||||||
@@ -146,6 +147,7 @@ static const struct Keyword {
|
|||||||
{ "void", TOK_VOID, TT_C89 | TT_C99 | TT_CC65 },
|
{ "void", TOK_VOID, TT_C89 | TT_C99 | TT_CC65 },
|
||||||
{ "volatile", TOK_VOLATILE, TT_C89 | TT_C99 | TT_CC65 },
|
{ "volatile", TOK_VOLATILE, TT_C89 | TT_C99 | TT_CC65 },
|
||||||
{ "while", TOK_WHILE, TT_C89 | TT_C99 | TT_CC65 },
|
{ "while", TOK_WHILE, TT_C89 | TT_C99 | TT_CC65 },
|
||||||
|
/* END SORTED.SH */
|
||||||
};
|
};
|
||||||
#define KEY_COUNT (sizeof (Keywords) / sizeof (Keywords [0]))
|
#define KEY_COUNT (sizeof (Keywords) / sizeof (Keywords [0]))
|
||||||
|
|
||||||
|
|||||||
@@ -85,11 +85,13 @@ static struct StdFuncDesc {
|
|||||||
const char* Name;
|
const char* Name;
|
||||||
void (*Handler) (FuncDesc*, ExprDesc*);
|
void (*Handler) (FuncDesc*, ExprDesc*);
|
||||||
} StdFuncs[] = {
|
} StdFuncs[] = {
|
||||||
|
/* BEGIN SORTED.SH */
|
||||||
{ "memcpy", StdFunc_memcpy },
|
{ "memcpy", StdFunc_memcpy },
|
||||||
{ "memset", StdFunc_memset },
|
{ "memset", StdFunc_memset },
|
||||||
{ "strcmp", StdFunc_strcmp },
|
{ "strcmp", StdFunc_strcmp },
|
||||||
{ "strcpy", StdFunc_strcpy },
|
{ "strcpy", StdFunc_strcpy },
|
||||||
{ "strlen", StdFunc_strlen },
|
{ "strlen", StdFunc_strlen },
|
||||||
|
/* END SORTED.SH */
|
||||||
};
|
};
|
||||||
#define FUNC_COUNT (sizeof (StdFuncs) / sizeof (StdFuncs[0]))
|
#define FUNC_COUNT (sizeof (StdFuncs) / sizeof (StdFuncs[0]))
|
||||||
|
|
||||||
|
|||||||
@@ -51,6 +51,7 @@
|
|||||||
/* CAUTION: table must be sorted for bsearch */
|
/* CAUTION: table must be sorted for bsearch */
|
||||||
static const FileId TypeTable[] = {
|
static const FileId TypeTable[] = {
|
||||||
/* Upper case stuff for obsolete operating systems */
|
/* Upper case stuff for obsolete operating systems */
|
||||||
|
/* BEGIN SORTED.SH */
|
||||||
{ "A", FILETYPE_LIB },
|
{ "A", FILETYPE_LIB },
|
||||||
{ "A65", FILETYPE_ASM },
|
{ "A65", FILETYPE_ASM },
|
||||||
{ "ASM", FILETYPE_ASM },
|
{ "ASM", FILETYPE_ASM },
|
||||||
@@ -66,7 +67,6 @@ static const FileId TypeTable[] = {
|
|||||||
{ "S", FILETYPE_ASM },
|
{ "S", FILETYPE_ASM },
|
||||||
{ "SER", FILETYPE_O65 },
|
{ "SER", FILETYPE_O65 },
|
||||||
{ "TGI", FILETYPE_O65 },
|
{ "TGI", FILETYPE_O65 },
|
||||||
|
|
||||||
{ "a", FILETYPE_LIB },
|
{ "a", FILETYPE_LIB },
|
||||||
{ "a65", FILETYPE_ASM },
|
{ "a65", FILETYPE_ASM },
|
||||||
{ "asm", FILETYPE_ASM },
|
{ "asm", FILETYPE_ASM },
|
||||||
@@ -82,6 +82,7 @@ static const FileId TypeTable[] = {
|
|||||||
{ "s", FILETYPE_ASM },
|
{ "s", FILETYPE_ASM },
|
||||||
{ "ser", FILETYPE_O65 },
|
{ "ser", FILETYPE_O65 },
|
||||||
{ "tgi", FILETYPE_O65 },
|
{ "tgi", FILETYPE_O65 },
|
||||||
|
/* END SORTED.SH */
|
||||||
};
|
};
|
||||||
|
|
||||||
#define FILETYPE_COUNT (sizeof (TypeTable) / sizeof (TypeTable[0]))
|
#define FILETYPE_COUNT (sizeof (TypeTable) / sizeof (TypeTable[0]))
|
||||||
|
|||||||
@@ -143,6 +143,7 @@ struct TargetEntry {
|
|||||||
** CAUTION: must be alphabetically for bsearch().
|
** CAUTION: must be alphabetically for bsearch().
|
||||||
*/
|
*/
|
||||||
static const TargetEntry TargetMap[] = {
|
static const TargetEntry TargetMap[] = {
|
||||||
|
/* BEGIN SORTED.SH */
|
||||||
{ "apple2", TGT_APPLE2 },
|
{ "apple2", TGT_APPLE2 },
|
||||||
{ "apple2enh", TGT_APPLE2ENH },
|
{ "apple2enh", TGT_APPLE2ENH },
|
||||||
{ "atari", TGT_ATARI },
|
{ "atari", TGT_ATARI },
|
||||||
@@ -181,6 +182,7 @@ static const TargetEntry TargetMap[] = {
|
|||||||
{ "sym1", TGT_SYM1 },
|
{ "sym1", TGT_SYM1 },
|
||||||
{ "telestrat", TGT_TELESTRAT },
|
{ "telestrat", TGT_TELESTRAT },
|
||||||
{ "vic20", TGT_VIC20 },
|
{ "vic20", TGT_VIC20 },
|
||||||
|
/* END SORTED.SH */
|
||||||
};
|
};
|
||||||
#define MAP_ENTRY_COUNT (sizeof (TargetMap) / sizeof (TargetMap[0]))
|
#define MAP_ENTRY_COUNT (sizeof (TargetMap) / sizeof (TargetMap[0]))
|
||||||
|
|
||||||
|
|||||||
@@ -2531,6 +2531,7 @@ static void NextToken (InputData* D)
|
|||||||
const char Keyword[12];
|
const char Keyword[12];
|
||||||
Token Tok;
|
Token Tok;
|
||||||
} KeywordTable[] = {
|
} KeywordTable[] = {
|
||||||
|
/* BEGIN SORTED.SH */
|
||||||
{ "abs", TOK_ABSOLUTE },
|
{ "abs", TOK_ABSOLUTE },
|
||||||
{ "addrsize", TOK_ADDRSIZE },
|
{ "addrsize", TOK_ADDRSIZE },
|
||||||
{ "auto", TOK_AUTO },
|
{ "auto", TOK_AUTO },
|
||||||
@@ -2579,6 +2580,7 @@ static void NextToken (InputData* D)
|
|||||||
{ "var", TOK_VAR },
|
{ "var", TOK_VAR },
|
||||||
{ "version", TOK_VERSION },
|
{ "version", TOK_VERSION },
|
||||||
{ "zp", TOK_ZEROPAGE },
|
{ "zp", TOK_ZEROPAGE },
|
||||||
|
/* END SORTED.SH */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -64,12 +64,14 @@ struct ConverterMapEntry {
|
|||||||
/* Converter table */
|
/* Converter table */
|
||||||
/* CAUTION: table must be alphabetically sorted for bsearch */
|
/* CAUTION: table must be alphabetically sorted for bsearch */
|
||||||
static const ConverterMapEntry ConverterMap[] = {
|
static const ConverterMapEntry ConverterMap[] = {
|
||||||
|
/* BEGIN SORTED.SH */
|
||||||
{ "geos-bitmap", GenGeosBitmap },
|
{ "geos-bitmap", GenGeosBitmap },
|
||||||
{ "geos-icon", GenGeosIcon },
|
{ "geos-icon", GenGeosIcon },
|
||||||
{ "koala", GenKoala },
|
{ "koala", GenKoala },
|
||||||
{ "lynx-sprite", GenLynxSprite },
|
{ "lynx-sprite", GenLynxSprite },
|
||||||
{ "raw", GenRaw },
|
{ "raw", GenRaw },
|
||||||
{ "vic2-sprite", GenVic2Sprite },
|
{ "vic2-sprite", GenVic2Sprite },
|
||||||
|
/* END SORTED.SH */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -73,9 +73,10 @@ static InputFormatDesc InputFormatTable[ifCount] = {
|
|||||||
/* CAUTION: table must be alphabetically sorted for bsearch */
|
/* CAUTION: table must be alphabetically sorted for bsearch */
|
||||||
static const FileId FormatTable[] = {
|
static const FileId FormatTable[] = {
|
||||||
/* Upper case stuff for obsolete operating systems */
|
/* Upper case stuff for obsolete operating systems */
|
||||||
|
/* BEGIN SORTED.SH */
|
||||||
{ "PCX", ifPCX },
|
{ "PCX", ifPCX },
|
||||||
|
|
||||||
{ "pcx", ifPCX },
|
{ "pcx", ifPCX },
|
||||||
|
/* END SORTED.SH */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -82,19 +82,20 @@ static OutputFormatDesc OutputFormatTable[ofCount] = {
|
|||||||
/* CAUTION: table must be alphabetically sorted for bsearch */
|
/* CAUTION: table must be alphabetically sorted for bsearch */
|
||||||
static const FileId FormatTable[] = {
|
static const FileId FormatTable[] = {
|
||||||
/* Upper case stuff for obsolete operating systems */
|
/* Upper case stuff for obsolete operating systems */
|
||||||
|
/* BEGIN SORTED.SH */
|
||||||
{ "A", ofAsm },
|
{ "A", ofAsm },
|
||||||
{ "ASM", ofAsm },
|
{ "ASM", ofAsm },
|
||||||
{ "BIN", ofBin },
|
{ "BIN", ofBin },
|
||||||
{ "C", ofC },
|
{ "C", ofC },
|
||||||
{ "INC", ofAsm },
|
{ "INC", ofAsm },
|
||||||
{ "S", ofAsm },
|
{ "S", ofAsm },
|
||||||
|
|
||||||
{ "a", ofAsm },
|
{ "a", ofAsm },
|
||||||
{ "asm", ofAsm },
|
{ "asm", ofAsm },
|
||||||
{ "bin", ofBin },
|
{ "bin", ofBin },
|
||||||
{ "c", ofC },
|
{ "c", ofC },
|
||||||
{ "inc", ofAsm },
|
{ "inc", ofAsm },
|
||||||
{ "s", ofAsm },
|
{ "s", ofAsm },
|
||||||
|
/* END SORTED.SH */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -59,7 +59,9 @@ struct PaletteMapEntry {
|
|||||||
/* Converter table */
|
/* Converter table */
|
||||||
/* CAUTION: table must be alphabetically sorted for bsearch */
|
/* CAUTION: table must be alphabetically sorted for bsearch */
|
||||||
static const PaletteMapEntry PaletteMap[] = {
|
static const PaletteMapEntry PaletteMap[] = {
|
||||||
|
/* BEGIN SORTED.SH */
|
||||||
{ "lynx-palette", GenLynxPalette },
|
{ "lynx-palette", GenLynxPalette },
|
||||||
|
/* END SORTED.SH */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user