aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar zinc <zinc@downsta.ir> 2026-10-14 10:30:45 +0000
committerGravatar zinc <zinc@downsta.ir> 2026-10-14 10:30:45 +0000
commit44e60a7afc4673c88890997d5779aa7c6c06f330 (patch)
treea7f950704ea90b6e63b42b70b52dade1b9b34375 /Makefile
parentx86-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 'Makefile')
-rw-r--r--Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index d5caa92..56894e4 100644
--- a/Makefile
+++ b/Makefile
@@ -8,6 +8,7 @@
# make check the minimal suite, for iterating (tests/test.sh -q)
# make test JOBS=4 the same, four sections at a time
# make genome build/core/genome.bin from src/, with the fixpoint check
+# make build/bin/zyi the interpreter alone (zy has a jit on arm64 and on x86-64 linux)
# make lsp build/bin/zclsp, the language server
# make web build/web/: the page, its script and zc.wasm
# make js build/js/: the javascript vm, its layout and genome
@@ -87,9 +88,12 @@ $(B)/core/genome.bin: $(ZC_DEPS) $(BIN)/zc0$(EXE) $(BIN)/mkgenome$(EXE) src/core
cp $(B)/s1/genome.bin $@
@echo "fixpoint: $$(( $$(wc -c < $@) / 8 )) words, $@ updated"
-# the interpreter: the vm core with the compiler genome inside
+# the vm core with the compiler genome inside: a jit on arm64 and x86-64 linux, else the interpreter
$(BIN)/zy$(EXE): src/core/core.c $(IO) $(B)/core/genome.bin $(CORE_H) | $(BIN)
$(CC) $(CFLAGS) -DJTYPE=int src/core/core.c $(IO) $(COREINC) -o $@
+# the interpreter alone, even on a host with a jit: make build/bin/zyi, to compare against zy
+$(BIN)/zyi$(EXE): src/core/core.c $(IO) $(B)/core/genome.bin $(CORE_H) | $(BIN)
+ $(CC) $(CFLAGS) -DZYINTERP -DJTYPE=int src/core/core.c $(IO) $(COREINC) -o $@
# the portable microcore
$(BIN)/zym$(EXE): src/micro/micro.c src/micro/micro_port.h $(PORT) $(B)/core/genome.bin $(CORE_H) | $(BIN)
$(CC) $(CFLAGS) $(MICRO_THREADS) src/micro/micro.c $(PORT) $(COREINC) -Isrc/micro -o $@