feat(v4.0.0): a 16384-word host node for the compiler tests
Node memory is a build parameter. Tests named test_host_*.c are now built with V4_NODE_WORDS=16384, the host node that will hold the compiler, the dictionary and the text being compiled; every other test keeps the 1024-word mesh node. The first such test checks the node at that size and the text assembler's branch placement, which only matters there: a branch slot that cannot reach the whole node is not used. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
7b710aa322
commit
31fcdcd0a3
+10
-2
@@ -35,6 +35,14 @@ WIDTHS := 32 64
|
||||
|
||||
BINDIR := $(HERE)/build
|
||||
|
||||
# Node memory is a build parameter (V4_NODE_WORDS, node.h; 1024 words unless
|
||||
# set). A mesh node is small, but the host node holds the compiler, the
|
||||
# dictionary and the text being compiled (JUSTIFICATION.md section 9), which
|
||||
# do not fit 1024 words. Tests named test_host_*.c are therefore built with a
|
||||
# host node of HOST_WORDS words; every other test keeps the mesh-node size.
|
||||
HOST_WORDS := 16384
|
||||
node_size = $(if $(findstring /test_host_,$(1)),-DV4_NODE_WORDS=$(HOST_WORDS))
|
||||
|
||||
.PHONY: all test sanitize clean $(addprefix test-,$(WIDTHS))
|
||||
|
||||
all: test
|
||||
@@ -63,13 +71,13 @@ endif
|
||||
define TEST_RULE
|
||||
$(BINDIR)/$(1)-$(notdir $(2)): $(2) $$(SRCS) $$(wildcard $(HERE)/include/v4/*.h) $(HERE)/Makefile
|
||||
@mkdir -p $(BINDIR)
|
||||
$$(CC) $$(CFLAGS) -I$(HERE)/include -DV4_CELL_BITS=$(1) \
|
||||
$$(CC) $$(CFLAGS) -I$(HERE)/include -DV4_CELL_BITS=$(1) $(call node_size,$(2)) \
|
||||
$(2) $$(SRCS) -o $$@
|
||||
|
||||
$(BINDIR)/san-$(1)-$(notdir $(2)): $(2) $$(SRCS) $$(wildcard $(HERE)/include/v4/*.h) $(HERE)/Makefile
|
||||
@mkdir -p $(BINDIR)
|
||||
$$(CC) $$(CSTD) $$(WARN) -O1 -g -fno-omit-frame-pointer \
|
||||
-fsanitize=address,undefined -fno-sanitize-recover=all -I$(HERE)/include -DV4_CELL_BITS=$(1) \
|
||||
-fsanitize=address,undefined -fno-sanitize-recover=all -I$(HERE)/include -DV4_CELL_BITS=$(1) $(call node_size,$(2)) \
|
||||
$(2) $$(SRCS) -o $$@
|
||||
endef
|
||||
|
||||
|
||||
Reference in New Issue
Block a user