aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar zinc <zinc@downsta.ir> 2026-10-14 10:34:44 +0000
committerGravatar zinc <zinc@downsta.ir> 2026-10-14 10:34:44 +0000
commit1d3c45e270341c820de221acb6f21f193e78a8c0 (patch)
tree48aeaad7ba13ad2705ea985a531f3a70a45e2d3d /Makefile
parenttodo: record the vision, priorities and settled feature decisions; add the it... (diff)
parentx86-64 jit: zyi target, ZYNOO3, bench and test timeouts, docs; drop a stray file (diff)
Merge the x86-64 jit, phase 1; todo: tick it, add phase 2
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 6195b78..75eb058 100644
--- a/Makefile
+++ b/Makefile
@@ -10,6 +10,7 @@
# make parity compile the test programs with zc0 and with the self-hosted
# compiler and compare what they print (src/tools/parity.sh)
# 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
@@ -91,9 +92,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 $@