diff options
| author | 2026-10-14 10:30:45 +0000 | |
|---|---|---|
| committer | 2026-10-14 10:30:45 +0000 | |
| commit | 44e60a7afc4673c88890997d5779aa7c6c06f330 (patch) | |
| tree | a7f950704ea90b6e63b42b70b52dade1b9b34375 /tests | |
| parent | x86-64 jit: translate ordinary vm blocks to x86-64 on linux, o3 regions on th... (diff) | |
x86-64 jit: zyi target, ZYNOO3, bench and test timeouts, docs; drop a stray file
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/bench/bench.sh | 6 | ||||
| -rwxr-xr-x | tests/test.sh | 7 |
2 files changed, 9 insertions, 4 deletions
diff --git a/tests/bench/bench.sh b/tests/bench/bench.sh index 65f455e..4ef2ca5 100644 --- a/tests/bench/bench.sh +++ b/tests/bench/bench.sh @@ -4,8 +4,12 @@ cd "$(dirname "$0")/../.."; T=$(mktemp -d); trap 'rm -rf $T' EXIT CC=${CC:-$(sh src/tools/findcc.sh)} || exit 1 make -s build/core/genome.bin || exit 1 -$CC -O2 -w -DJTYPE=int src/core/core.c src/core/io_linux.c -Isrc/core -Ibuild/core/map --embed-dir=build/core -o $T/zy +$CC -O2 -w -DJTYPE=int -DZYINTERP src/core/core.c src/core/io_linux.c -Isrc/core -Ibuild/core/map --embed-dir=build/core -o $T/zy vms=("$T/zy"); names=("interp") +# the host's own jit, where there is one (x86-64 linux: blocks are translated, o3 regions run on the region interpreter) +if [ "$(uname -s)" = Linux ] && [ "$(uname -m)" = x86_64 ]; then + $CC -O2 -w -DJTYPE=int src/core/core.c src/core/io_linux.c -Isrc/core -Ibuild/core/map --embed-dir=build/core -o $T/zyn && { vms+=("$T/zyn"); names+=("x86-64 jit"); } +fi if command -v llvm-config >/dev/null; then $CC -O2 -w -DJTYPE=int -DZYLLVM $(llvm-config --cflags) src/core/core.c src/core/io_linux.c -Isrc/core -Ibuild/core/map --embed-dir=build/core -o $T/zyl $(llvm-config --ldflags --libs) && { vms+=("$T/zyl"); names+=("llvm"); } fi diff --git a/tests/test.sh b/tests/test.sh index 709d09c..809da6e 100755 --- a/tests/test.sh +++ b/tests/test.sh @@ -50,9 +50,10 @@ ROOT=$T CC=${CC:-$(sh src/tools/findcc.sh)} || exit 1 export CC -# the language server runs on the interpreter unless the host has the arm64 jit, and a -# check of a large document then takes many seconds: stretch the drivers' deadlines -if [ -z "${ZC_TEST_TIMEOUT_SCALE:-}" ]; then case "$(uname -m)" in arm64|aarch64) ZC_TEST_TIMEOUT_SCALE=1;; *) ZC_TEST_TIMEOUT_SCALE=8;; esac; fi +# the language server runs on the interpreter unless the host has a jit (arm64, or x86-64 +# linux), and a check of a large document then takes many seconds: stretch the drivers' +# deadlines. the x86-64 jit gets a little room, since it does not compile o3 regions +if [ -z "${ZC_TEST_TIMEOUT_SCALE:-}" ]; then case "$(uname -s)-$(uname -m)" in *-arm64|*-aarch64) ZC_TEST_TIMEOUT_SCALE=1;; Linux-x86_64) ZC_TEST_TIMEOUT_SCALE=2;; *) ZC_TEST_TIMEOUT_SCALE=8;; esac; fi export ZC_TEST_TIMEOUT_SCALE # the default map, generated as make does it, and the tools built against it $CC -O2 -w -fwrapv src/tools/genmap.c -o $T/genmap || exit 1 |
