From 147a8a26b9d080f3eb8e640f8ec04db1dcaf6e4d Mon Sep 17 00:00:00 2001 From: Hojun-Cho Date: Thu, 4 Jun 2026 04:01:15 +0900 Subject: [PATCH] w6c: unstale the cg_sret_retsize header doc for the #38 tagged arm (#38 review) --- cmd/w6c/cgen.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/w6c/cgen.c b/cmd/w6c/cgen.c index cdd48c01..50a3ae84 100644 --- a/cmd/w6c/cgen.c +++ b/cmd/w6c/cgen.c @@ -313,8 +313,10 @@ fld_isfloat(Type *t, int *isf32) * via sret instead of registers (#10). The element footprint walk * matches the N_RETURN tuple SEND exactly (a float = 1 SSE * eightbyte, a slice/str its 3-word header, a scalar 1 GP word). - * Everything else (in-cap tuples, tagged unions, str, slices, scalars) - * routes through its register-return ABI → 0. */ + * - TY_TAGGED whose slot exceeds the AX/DX/CX/R8 cursor + * (> TUPLE_GPCAP eightbytes) → its natural size (#38). + * Everything else (in-cap tuples, in-cap tagged unions, str, slices, + * scalars) routes through its register-return ABI → 0. */ static int cg_sret_retsize(Type *rt) {