scripts: fix stale M1 comments and tighten the harness checks
Preserve the dis34 output on a failed round-trip instead of claiming a deleted temp file is kept, require GSPA "No Warnings" in addition to "No Errors", and correct the six-function and M1 pipeline comments.
This commit is contained in:
1 parent
eacaab68f6
commit
7749cc810b
4 files changed
+12
-5
No files matched your search
@@ -32,6 +32,7 @@ fail() {
|
||||
[ -x "$DIS34" ] || fail "dis34 not found or not executable: $DIS34"
|
||||
|
||||
TMP=$(mktemp -d "${TMPDIR:-/tmp}/m1-dis34.XXXXXX")
|
||||
FAIL_LOG=${M1_DIS_FAIL_LOG:-${TMPDIR:-/tmp}/m1-dis34-failure.txt}
|
||||
trap 'rm -rf "$TMP"' EXIT HUP INT TERM
|
||||
|
||||
# Read little-endian fields out of the COFF. od keeps this dependency-free.
|
||||
@@ -179,8 +180,11 @@ expect_at() {
|
||||
seen { print " " $0; n++ }
|
||||
seen && n >= 3 { exit }
|
||||
' "$TMP/dis34.txt"
|
||||
echo " full disassembly: $TMP/dis34.txt (kept until exit; rerun with"
|
||||
echo " DIS34=... if it has already been removed)"
|
||||
if cp "$TMP/dis34.txt" "$FAIL_LOG" 2>/dev/null; then
|
||||
echo " full disassembly preserved at: $FAIL_LOG"
|
||||
else
|
||||
echo " full disassembly: $TMP/dis34.txt (temporary; removed on exit)"
|
||||
fi
|
||||
} >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
@@ -104,6 +104,8 @@ timeout "${DOSBOX_TIMEOUT:-300}" "$DOSBOX" -conf "$DOSBOX_CONF" \
|
||||
sed 's/\r$//' "$SDK/M1.LST" > "$WORK/m1.lst"
|
||||
grep -q 'No Errors' "$WORK/m1.lst" \
|
||||
|| { grep -i -B2 -A2 'error' "$WORK/m1.lst" >&2 || true; fail "GSPA reported errors"; }
|
||||
grep -q 'No Warnings' "$WORK/m1.lst" \
|
||||
|| { grep -i -B2 -A2 'warning' "$WORK/m1.lst" >&2 || true; fail "GSPA reported warnings"; }
|
||||
[ -f "$SDK/M1.OUT" ] || fail "GSPLNK produced no M1.OUT"
|
||||
sed 's/\r$//' "$SDK/M1.MAP" > "$WORK/m1.map"
|
||||
cp "$SDK/M1.OUT" "$COFF"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# M1 test gate: compile four C functions, assemble/link with GSPA/GSPLNK,
|
||||
# M1 test gate: compile six C functions, assemble/link with GSPA/GSPLNK,
|
||||
# load the COFF in MAME and check the marker words.
|
||||
set -eu
|
||||
ROOT=$(cd "$(dirname "$0")/../../.." && pwd)
|
||||
|
||||
+3
-2
@@ -1,10 +1,11 @@
|
||||
#!/bin/sh
|
||||
# tms-clang -- M0 pipeline: clang IR, scale GEPs, optimize, normalize GEPs.
|
||||
# tms-clang -- M1 IR pipeline: clang IR, scale GEPs, optimize, normalize GEPs.
|
||||
#
|
||||
# Usage: tms-clang [-O0|-O2] [-I dir] -o OUT.ll IN.c
|
||||
#
|
||||
# -O2 (the default) scales, optimizes, then normalizes; -O0 skips the optimizer.
|
||||
# No machine code is produced in M0.
|
||||
# The output is normalized IR for llc -march=tms34010; this wrapper does not
|
||||
# invoke llc itself.
|
||||
set -eu
|
||||
|
||||
ROOT=$(cd "$(dirname "$0")/.." && pwd)
|
||||
|
||||
Reference in new issue
Block a user