Hojun-Cho
69a817f0f3
selfhost+test: decompose user-struct by-value params (#11)
wwstage param-slot allocator dispatched isfloat/istagged/isslice/
isstr/catch-all and skipped TY_STRUCT. `fn(a: S, b: S)` where S is
16B emitted $16 frame (DI/SI only); cstage emits $32 (DI/SI/DX/CX)
per SysV ABI.
Two-site fix mirroring cmd/w6c/cgen.c:6820 (callee prologue) and
:4240 (caller push):
- New structparamsize(c, t) helper in cgenutil.ww resolves the
TY_STRUCT TNAME chain, returns totsize for sizes (0,16], else 0.
>16B drops to stack — bug-compat with cstage's <=16 gate.
- New struct arm in cgfnparams + matching cgfn pre-scan in
cgendecl.ww. nw = (size>8) ? 2 : 1; partial-fit stitch (idx=5
+ nw=2) emits one reg + one stack tail.
- New struct branch in pushargsrev N_IDENT arm: MOVQ + PUSHQ
high→low so cgcall's existing pop drains correctly.
Test 717: 4 rows × {cstage, wwstage, asm-id}. Headline 2×16B,
mixed 16B+8B (caller-side surface), str+struct regression guard,
partial-fit 5×i64+16B stitch.
2026-05-17 00:27:22 +09:00
..
2026-05-16 10:47:50 +09:00
2026-05-11 13:49:27 +09:00
2026-05-11 13:49:27 +09:00
2026-05-12 04:15:31 +09:00
2026-05-16 11:17:20 +09:00
2026-05-11 13:49:27 +09:00
2026-05-11 13:49:27 +09:00
2026-05-12 11:35:50 +09:00
2026-05-12 12:45:11 +09:00
2026-05-11 13:49:27 +09:00
2026-05-11 13:49:27 +09:00
2026-05-12 13:44:27 +09:00
2026-05-12 13:37:31 +09:00
2026-05-16 03:00:34 +09:00
2026-05-13 20:06:24 +09:00
2026-05-14 02:44:57 +09:00
2026-05-14 01:58:52 +09:00
2026-05-14 00:36:34 +09:00
2026-05-13 23:45:35 +09:00
2026-05-14 19:12:20 +09:00
2026-05-14 00:21:53 +09:00
2026-05-14 23:45:14 +09:00
2026-05-14 23:26:49 +09:00
2026-05-15 01:08:52 +09:00
2026-05-15 01:39:37 +09:00
2026-05-15 02:14:00 +09:00
2026-05-15 14:16:53 +09:00
2026-05-15 11:24:33 +09:00
2026-05-15 15:19:38 +09:00
2026-05-15 15:06:37 +09:00
2026-05-15 11:34:47 +09:00
2026-05-15 16:43:07 +09:00
2026-05-15 18:13:02 +09:00
2026-05-15 18:14:33 +09:00
2026-05-15 18:45:21 +09:00
2026-05-15 19:07:29 +09:00
2026-05-16 00:07:00 +09:00
2026-05-16 13:58:22 +09:00
2026-05-16 10:47:50 +09:00
2026-05-16 11:17:20 +09:00
2026-05-16 12:20:56 +09:00
2026-05-16 11:37:17 +09:00
2026-05-16 11:17:20 +09:00
2026-05-16 12:52:36 +09:00
2026-05-16 13:45:33 +09:00
2026-05-16 23:32:27 +09:00
2026-05-17 00:00:55 +09:00
2026-05-17 00:27:22 +09:00
2026-05-11 13:49:27 +09:00
2026-05-12 13:50:09 +09:00
2026-05-15 11:34:47 +09:00
2026-05-12 03:14:20 +09:00
2026-05-12 03:49:09 +09:00
2026-05-15 11:34:47 +09:00
2026-05-15 14:05:55 +09:00
2026-05-15 15:11:59 +09:00
2026-05-15 15:48:13 +09:00
2026-05-15 17:13:32 +09:00
2026-05-15 17:14:49 +09:00
2026-05-16 02:42:41 +09:00
2026-05-15 00:26:10 +09:00
2026-05-15 00:27:38 +09:00
2026-05-15 00:28:59 +09:00
2026-05-15 09:00:34 +09:00
2026-05-15 09:00:34 +09:00
2026-05-15 09:00:34 +09:00
2026-05-15 09:00:34 +09:00
2026-05-15 09:00:34 +09:00
2026-05-15 09:00:34 +09:00
2026-05-15 09:00:34 +09:00
2026-05-13 16:07:18 +09:00
2026-05-11 13:49:27 +09:00
2026-05-11 13:49:27 +09:00
2026-05-11 16:48:58 +09:00
2026-05-12 16:21:13 +09:00
2026-05-11 16:48:58 +09:00
2026-05-11 17:52:29 +09:00
2026-05-12 03:58:55 +09:00
2026-05-14 02:51:49 +09:00
2026-05-15 09:00:34 +09:00