More correct alignment. Foreach added. Removed dynamic designated array initialization. Use 16 byte alignment on arrays >= 16 for x64

This commit is contained in:
Christoffer Lerno
2021-01-27 00:09:09 +01:00
committed by Christoffer Lerno
parent 26d25e3f74
commit 45c4f205bb
29 changed files with 1078 additions and 203 deletions

View File

@@ -576,6 +576,11 @@ bool type_is_homogenous_aggregate(Type *type, Type **base, unsigned *elements)
AlignSize type_alloca_alignment(Type *type)
{
if (build_target.abi == ABI_X64)
{
type = type_flatten(type);
if (type->type_kind == TYPE_ARRAY && type_size(type) >= 16) return 16;
}
return type_abi_alignment(type);
}