kit

kit
git clone https://git.ryansepassi.com/git/kit.git
Log | Files | Refs | README

commit ad61e55784cc0159d881e48ba40fd38ad1590aa2
parent cac224526af12ea3f31b9daf0e45c087af9c536b
Author: Ryan Sepassi <rsepassi@gmail.com>
Date:   Thu, 28 May 2026 12:02:38 -0700

doc: refresh wasm test/parse W-path checklist

The W-path now runs 425 pass / 7 fail / 0 compile-fail / 32 skip /
1 hang (was 405 / 7 / 11 / 41 / 1). The bitfield and FP-negate sections
are gone from the phased-rollout skip list, and the compile-fail
section is replaced with a brief note on what fixed each. The 7
wrong-exit fails and the 1 hang are unchanged.

Diffstat:
Mdoc/WASM_PARSE_CHECKLIST.md | 57++++++++++++++++++++++++++-------------------------------
1 file changed, 26 insertions(+), 31 deletions(-)

diff --git a/doc/WASM_PARSE_CHECKLIST.md b/doc/WASM_PARSE_CHECKLIST.md @@ -4,9 +4,9 @@ Status of the Wasm CGTarget against the `test/parse` C suite, path **W** (`cfree cc -O0 -target wasm32-none -c case.c` → `cfree run -e test_main case.wasm`). - Host: arm64 (native JIT for the re-lowering). Opt level 0. -- 465 cases: **405 pass · 7 fail · 11 compile-fail · 41 skip · 1 hang**. -- Only the 26 skips below match run.sh's phased-rollout regex (reported SKIP). - The fails/compile-fails fall outside it and report as **FAIL** in the harness. +- 465 cases: **425 pass · 7 fail · 0 compile-fail · 32 skip · 1 hang**. +- The skips below match run.sh's phased-rollout regex (reported SKIP). + The fails fall outside it and report as **FAIL** in the harness. - Reproduce / re-probe: `build/wasm_probe.sh [filter]`; results in `build/wasm_probe/results.tsv`, per-case logs alongside. @@ -31,21 +31,29 @@ Status of the Wasm CGTarget against the `test/parse` C suite, path **W** - [ ] `builtin_clear_cache_01` — exp 42, got 134; `AddressSanitizer: DEADLYSIGNAL` - [ ] `6_8_31_switch_char_extremes` — exp 5, got 20 -## ❌ Compile-fail — `cc -target wasm32-none` fatal (11) - -- [ ] `6_7_1_03_thread_local_basic` — `obj section name '.tdata' for target obj=3 not yet implemented` (TLS) -- [ ] `gnu_thread_storage_01` — `obj section name '.tbss' for target obj=3 not yet implemented` (TLS) -- [ ] `call_indirect_arg_struct_byval` — `wasm: void value type requested` -- [ ] `call_indirect_arg_struct_field` — `wasm: void value type requested` -- [ ] `call_indirect_arg_struct_field_two_parts` — `wasm: void value type requested` -- [ ] `call_indirect_ret_struct_byval` — `wasm: void value type requested` -- [ ] `call_indirect_ret_struct_direct` — `wasm: void value type requested` -- [ ] `call_large_const_global_struct_byval` — `wasm: void value type requested` -- [ ] `6_8_26_switch_many_cases` — `wasm: too many switch cases for br_table` -- [ ] `builtin_25_atomic_fetch_nand` — `wasm target: atomic NAND has no native wasm-threads opcode` -- [ ] `rv64_atomic_widths_orders` — `wasm: reg 22 used before being defined` (use-before-def in lowering) - -## ⏭️ Skip — phased-rollout (41, reported SKIP) +## ✅ Compile-fail — all fixed (was 11) + +- [x] `6_7_1_03_thread_local_basic`, `gnu_thread_storage_01` — wasm has no TLS + model (one linear memory per instance), so thread-locals are ordinary data: + `obj_secname_tdata/tbss` name them `.tdata`/`.tbss` and `CG_IR_TLS_ADDR_OF` + lowers to a plain symbol address (`src/obj/obj_secnames.c`, + `src/arch/wasm/ir_emit.c`). +- [x] `call_indirect_{arg,ret}_struct_*`, `call_large_const_global_struct_byval` + — `CG_IR_LOAD` of an aggregate now lowers to a `memory.copy` instead of a + scalar load (shared `wasm_ir_emit_agg_move` in `src/arch/wasm/ir_emit.c`). +- [x] `6_8_26_switch_many_cases` — large dense switches now lower to a real + `br_table`: `WasmInsn.targets` is a heap-grown vector (no 64-entry cap), + the dense/sparse choice is a density test (`switch_use_br_table`), and the + validator's control-frame stack grows on demand (`src/arch/wasm/emit.c`, + `src/wasm/{wasm.h,module.c,decode.c,wat.c,validate.c}`). +- [x] `builtin_25_atomic_fetch_nand` — `AO_NAND` (no native wasm opcode) lowers + to an `atomic.rmw.cmpxchg` retry loop (`src/arch/wasm/emit.c`). +- [x] `rv64_atomic_widths_orders` — `cmp_branch`/`switch`/`if`-cond operands now + go through `wasm_ir_source_op`, so an address-taken local (e.g. the + `expected` out-param of `__atomic_compare_exchange`) is loaded from memory + rather than read as an undefined wasm local (`src/arch/wasm/ir_emit.c`). + +## ⏭️ Skip — phased-rollout (32, reported SKIP) ### `long double` — `wasm: long double not supported` Wasm now advertises binary128 `long double` (clang/LLVM convention); the backend @@ -83,19 +91,6 @@ returning 0. `ldbl128_01_layout_macros` still PASSES (compile-time layout checks - [ ] `i128_13_signed_div_mod` - [ ] `i128_14_arbitrary_mul` -### Bitfields — `wasm target: bitfield_store/bitfield_load not yet implemented` -- [ ] `6_7_2_1_01_bitfield` (store) -- [ ] `6_7_2_1_07_signed_bitfield` (store) -- [ ] `6_7_2_1_08_zero_width_bitfield` (store) -- [ ] `6_7_2_1_09_bool_bitfield` (store) -- [ ] `6_7_2_1_10_static_bitfield_pack` (load) - -### FP negate — `wasm: fneg via 0-x not supported` -- [ ] `6_5_70_fp_unary_neg_struct_field` -- [ ] `6_5_71_fp_unary_neg_zero` -- [ ] `builtin_28_fabs_inf` -- [ ] `rv64_fp_round_trip` - ### Other - [ ] `asm_01_grammar` — `wasm target: asm register clobbers not yet supported` - [ ] `asm_02_file_scope` — `wasm target: address of undefined symbol not yet implemented`