commit ae86141c1caddb69705fdacbbbd3419e822cbdb9
parent 75f73a664a610f563956626b66d30aa3c5766190
Author: Ryan Sepassi <rsepassi@gmail.com>
Date: Fri, 29 May 2026 13:56:41 -0700
test: run x64 and rv64 assembler+disassembler in the default suite
The asm harness runs one arch per invocation (CFREE_TEST_ARCH, default aa64),
so under `make test` the x64 and rv64 encode/decode/listing corpora never
ran — x64's disassembler, encoder, and the rv64 assembler had zero default
coverage (audit test-coverage gaps). Add test-asm-x64 (HTL) and test-asm-rv64
(HT) lanes to DEFAULT_TEST_TARGETS; the H/T/L paths only produce/compare
bytes, so they run on any host without qemu (exec paths stay on the smoke
targets).
This activates the x64 SSE-decode and rv64 symbolic-branch corpus cases added
in the preceding commits. Refresh the stale x64_symbols listing golden, which
predated the disassembler's reloc-annotation feature (it now shows the correct
[X64_PLT32]/[PC32] tags, matching aa64/rv64).
x64 lane: 7 pass; rv64 lane: 39 pass; full regression green.
Diffstat:
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/test/asm/listing/x64_symbols.expected.lst b/test/asm/listing/x64_symbols.expected.lst
@@ -1,7 +1,7 @@
Disassembly of section .text:
0000000000000000 <test_main>:
- 0: e800000000 callq 0x5 ; ext_fn-4
- 5: e900000000 jmp 0xa ; local_done-4
+ 0: e800000000 callq 0x5 ; ext_fn-4 [X64_PLT32]
+ 5: e900000000 jmp 0xa ; local_done-4 [PC32]
000000000000000a <local_done>:
a: c3 ret
diff --git a/test/test.mk b/test/test.mk
@@ -35,6 +35,8 @@ TEST_TARGETS = \
test-abi-classify \
test-ar \
test-asm \
+ test-asm-x64 \
+ test-asm-rv64 \
test-bounce \
test-cbackend \
test-cg-api \
@@ -102,6 +104,8 @@ DEFAULT_TEST_TARGETS = \
test-debug \
test-parse \
test-asm \
+ test-asm-x64 \
+ test-asm-rv64 \
test-isa \
test-aa64-inline \
test-rv64-inline \
@@ -584,6 +588,16 @@ test-parse-err: lib $(PARSE_RUNNER)
test-asm: lib $(TEST_RT_DEP) $(ASM_RUNNER) $(LINK_EXE_RUNNER) $(JIT_RUNNER)
bash test/asm/run.sh
+# The asm harness runs one arch per invocation (CFREE_TEST_ARCH, default aa64),
+# so x64/rv64 encode (H), decode (T) and listing (L) corpora otherwise never
+# run under `make test`. These lanes exercise them on any host: H/T/L need no
+# native execution (they only produce/compare bytes), so the exec paths
+# (D/E/J) are deliberately excluded and left to the smoke/qemu targets.
+test-asm-x64: lib $(ASM_RUNNER)
+ @CFREE_TEST_ARCH=x64 CFREE_TEST_PATHS=HTL bash test/asm/run.sh
+test-asm-rv64: lib $(ASM_RUNNER)
+ @CFREE_TEST_ARCH=rv64 CFREE_TEST_PATHS=HT bash test/asm/run.sh
+
test-wasm: test-wasm-front test-wasm-target test-wasm-toy
test-wasm-front: bin $(WASM_TOOL) $(LINK_EXE_RUNNER) $(JIT_RUNNER)