Skip to content

Commit

Permalink
Fix #2561 - ARM64 ABI bug for homogenous structs with more than 4 ele…
Browse files Browse the repository at this point in the history
…ments
  • Loading branch information
gingerBill committed May 29, 2023
1 parent c38842e commit f3a4630
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/llvm_abi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1179,7 +1179,11 @@ namespace lbAbiArm64 {
if (is_register(type)) {
args[i] = non_struct(c, type);
} else if (is_homogenous_aggregate(c, type, &homo_base_type, &homo_member_count)) {
args[i] = lb_arg_type_direct(type, LLVMArrayType(homo_base_type, homo_member_count), nullptr, nullptr);
if (is_homogenous_aggregate_small_enough(homo_base_type, homo_member_count)) {
args[i] = lb_arg_type_direct(type, LLVMArrayType(homo_base_type, homo_member_count), nullptr, nullptr);
} else {
args[i] = lb_arg_type_indirect(type, nullptr);;
}
} else {
i64 size = lb_sizeof(type);
if (size <= 16) {
Expand Down

0 comments on commit f3a4630

Please sign in to comment.