[cfe-commits] r128850 - /cfe/trunk/lib/Basic/Targets.cpp
Sandeep Patel
deeppatel1987 at gmail.com
Mon Apr 4 15:58:12 PDT 2011
Author: sandeep
Date: Mon Apr 4 17:58:12 2011
New Revision: 128850
URL: http://llvm.org/viewvc/llvm-project?rev=128850&view=rev
Log:
Explain why layout prefers 32 for small types on Thumb.
Modified:
cfe/trunk/lib/Basic/Targets.cpp
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=128850&r1=128849&r2=128850&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Mon Apr 4 17:58:12 2011
@@ -1729,6 +1729,8 @@
// FIXME: Should we just treat this as a feature?
IsThumb = getTriple().getArchName().startswith("thumb");
if (IsThumb) {
+ // Thumb1 add sp, #imm requires the immediate value be multiple of 4,
+ // so set preferred for small types to 32.
DescriptionString = ("e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-"
"i64:64:64-f32:32:32-f64:64:64-"
"v64:64:64-v128:64:128-a0:0:32-n32");
@@ -1758,6 +1760,8 @@
UseBitFieldTypeAlignment = false;
if (IsThumb) {
+ // Thumb1 add sp, #imm requires the immediate value be multiple of 4,
+ // so set preferred for small types to 32.
DescriptionString = ("e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-"
"i64:32:32-f32:32:32-f64:32:32-"
"v64:32:64-v128:32:128-a0:0:32-n32");
More information about the cfe-commits
mailing list