fix 128 bit int alignment on arm64

Fixes #2403
This commit is contained in:
Laytan Laats
2024-04-04 18:39:41 +02:00
parent 5fe0788cff
commit 31407d9b1b
5 changed files with 69 additions and 5 deletions

View File

@@ -275,7 +275,7 @@ gb_internal i64 lb_alignof(LLVMTypeRef type) {
case LLVMIntegerTypeKind:
{
unsigned w = LLVMGetIntTypeWidth(type);
return gb_clamp((w + 7)/8, 1, build_context.ptr_size);
return gb_clamp((w + 7)/8, 1, build_context.max_align);
}
case LLVMHalfTypeKind:
return 2;