wcc/ww: cgcall drain pops widened GP words before the float arm

The arg-drain loop checked node_isfloat before popping a widened
arg's GP words, so a float arg adjacent to a widened (tagged) arg
read the wrong stack slot: the f64 took the widened payload (#30), or
the float arm ate the tag word into X0 and the payload landed in DI
as the tag (#48). One missing branch, two manifestations — mirror
cstage's widen-first pop (cgen.c:9650-9665). Review items #30+#48
(fold reviewer-verified one-mechanism against the cstage twin).
This commit is contained in:
2026-06-12 21:11:35 +09:00
parent f00775759d
commit a4a4cd7c16
6 changed files with 474 additions and 0 deletions

View File

@@ -379,6 +379,7 @@ TESTS = $(BIN)/test_smoke $(BIN)/test_lex $(BIN)/test_parse $(BIN)/test_check \
$(BIN)/test_append_structlit_evalorder_run \
$(BIN)/test_tuple_index_read_run \
$(BIN)/test_f6_header_run \
$(BIN)/test_f9_float_run \
$(BIN)/test_xmod_fnptr_const_run \
$(BIN)/test_tuple_slot_layout_run \
$(BIN)/test_tagged_tuple_widen_run \
@@ -2140,6 +2141,12 @@ $(BIN)/test_f6_header_run: test/wcc/949_f6_header_run.c \
$(LIB)/libwwrt.a | $(BIN)
$(CC) $(CFLAGS) -o $@ $<
$(BIN)/test_f9_float_run: test/wcc/949_f9_float_run.c \
$(BIN)/ww $(BIN)/w6c $(BIN)/w6a $(BIN)/w6l \
$(BIN)/ww_ww $(BIN)/w6c_ww $(BIN)/w6a_ww $(BIN)/w6l_ww \
$(LIB)/libwwrt.a | $(BIN)
$(CC) $(CFLAGS) -o $@ $<
$(BIN)/test_xmod_fnptr_const_run: test/wcc/949_xmod_fnptr_const_run.c \
$(BIN)/ww $(BIN)/w6c $(BIN)/w6a $(BIN)/w6l \
$(BIN)/ww_ww $(BIN)/w6c_ww $(BIN)/w6a_ww $(BIN)/w6l_ww \