================
@@ -1114,3 +1114,20 @@ TargetInfo::simplifyConstraint(StringRef Constraint,
   }
   return Result;
 }
+
+unsigned clang::Microsoft64BitMinGlobalAlign(uint64_t TypeSize) {
+  // MSVC does size based alignment for arm64 based on alignment section in
+  // below document. Replicate that to keep alignment consistent with object
+  // files compiled by MSVC.
+  // https://docs.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions
+  // The same is done for x64, but not documented.
+
+  if (TypeSize >= 512) // TypeSize >= 64 bytes
+    return 128;        // align type at least 16 bytes
+  if (TypeSize >= 64)  // TypeSize >= 8 bytes
+    return 64;         // align type at least 8 butes
----------------
zmodem wrote:

Thanks! Done.

https://github.com/llvm/llvm-project/pull/196505
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to