Merge pull request #7283 from kalsprite/i386_byval

i386: pass aggregate arguments by value on the stack
This commit is contained in:
Jeroen van Rijn
2026-08-11 12:02:54 +02:00
committed by GitHub

View File

@@ -437,7 +437,9 @@ namespace lbAbi386 {
if (sz == 0) {
args[i] = lb_arg_type_ignore(t);
} else {
args[i] = lb_arg_type_indirect(t, nullptr);
// Aggregates are pushed onto the stack by value, not passed as a pointer
// to a caller-owned copy. This is the rule for both i386 targets.
args[i] = lb_arg_type_indirect_byval(c, t);
}
} else {
args[i] = non_struct(c, t, false);