Merge pull request #3374 from laytan/fix-128-ints-alignment-arm64

fix 128 bit int alignment on arm64
This commit is contained in:
gingerBill
2024-04-04 18:06:01 +01:00
committed by GitHub
5 changed files with 69 additions and 5 deletions
+1 -1
View File
@@ -521,7 +521,7 @@ gb_global TargetMetrics target_darwin_amd64 = {
gb_global TargetMetrics target_darwin_arm64 = {
TargetOs_darwin,
TargetArch_arm64,
8, 8, 8, 16,
8, 8, 16, 16,
str_lit("arm64-apple-macosx"), // NOTE: Changes during initialization based on build flags.
str_lit("e-m:o-i64:64-i128:128-n32:64-S128"),
};
+1 -1
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;