[PATCH] D34859: [COFF, ARM64] Set the data type widths and the data layout string for COFF ARM64
Mandeep Singh Grang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 29 19:16:03 PDT 2017
mgrang created this revision.
Herald added subscribers: kristof.beyls, aemerson.
COFF ARM64 is LLP64 platform. So int is 4 bytes, long is 4 bytes and long long is 8 bytes.
https://reviews.llvm.org/D34859
Files:
lib/Basic/Targets.cpp
Index: lib/Basic/Targets.cpp
===================================================================
--- lib/Basic/Targets.cpp
+++ lib/Basic/Targets.cpp
@@ -6579,13 +6579,24 @@
MicrosoftARM64TargetInfo(const llvm::Triple &Triple,
const TargetOptions &Opts)
: WindowsTargetInfo<AArch64leTargetInfo>(Triple, Opts), Triple(Triple) {
+
+ // This is an LLP64 paltform.
+ // int:4, long:4, long long:8.
WCharType = UnsignedShort;
+ IntWidth = IntAlign = 32;
+ LongWidth = LongAlign = 32;
+ DoubleAlign = LongLongAlign = 64;
+ IntMaxType = SignedLongLong;
+ Int64Type = SignedLongLong;
SizeType = UnsignedLongLong;
+ PtrDiffType = SignedLongLong;
+ IntPtrType = SignedLongLong;
+
TheCXXABI.set(TargetCXXABI::Microsoft);
}
void setDataLayout() override {
- resetDataLayout("e-m:w-i64:64-i128:128-n32:64-S128");
+ resetDataLayout("e-m:w-p:64:64-i32:32-i64:64-i128:128:128");
}
void getVisualStudioDefines(const LangOptions &Opts,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34859.104807.patch
Type: text/x-patch
Size: 1021 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170630/6fd17d25/attachment.bin>
More information about the cfe-commits
mailing list