From 6256bc1d0485a74e7d6728c95603a54a4149cb64 Mon Sep 17 00:00:00 2001 From: lemon Date: Sat, 22 Nov 2025 13:25:07 +0100 Subject: sysv: nested scalar classification of struct shouldn't return KPTR, used to indicate aggregate in the stack --- amd64/sysv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'amd64') diff --git a/amd64/sysv.c b/amd64/sysv.c index 7410499..9d97b86 100644 --- a/amd64/sysv.c +++ b/amd64/sysv.c @@ -13,7 +13,7 @@ clsscalar(uchar cls[2], uint off, union type ty) } else { /* INTEGER */ assert(isint(ty) || ty.t == TYPTR); if (cls2siz[*fcls] < cls2siz[k]) - *fcls = k; + *fcls = k == KPTR ? KI64 : k; } if (off % 8 >= 4 && cls2siz[*fcls] < 8) *fcls = kisint(*fcls) ? KI64 : KF64; -- cgit v1.2.3