<p dir="ltr">It should be possible to test this, no?</p>
<div class="gmail_quote">On Mar 16, 2015 12:11 PM, "Tamas Berghammer" <<a href="mailto:tberghammer@google.com">tberghammer@google.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi danalbert,<br>
<br>
Create android x86_32 target info<br>
<br>
On android x86_32 the long double is only 64 bits (compared to 80 bits on linux x86_32). This CL creates a new target info class to use the correct size for long double on android x86_32.<br>
<br>
<a href="http://reviews.llvm.org/D8357" target="_blank">http://reviews.llvm.org/D8357</a><br>
<br>
Files:<br>
lib/Basic/Targets.cpp<br>
<br>
Index: lib/Basic/Targets.cpp<br>
===================================================================<br>
--- lib/Basic/Targets.cpp<br>
+++ lib/Basic/Targets.cpp<br>
@@ -6585,6 +6585,17 @@<br>
};<br>
} // end anonymous namespace.<br>
<br>
+namespace {<br>
+// x86-32 Android target<br>
+class AndroidX86_32TargetInfo : public LinuxTargetInfo<X86_32TargetInfo> {<br>
+public:<br>
+ AndroidX86_32TargetInfo(const llvm::Triple &Triple)<br>
+ : LinuxTargetInfo<X86_32TargetInfo>(Triple) {<br>
+ LongDoubleWidth = 64;<br>
+ }<br>
+};<br>
+} // end anonymous namespace<br>
+<br>
<br>
//===----------------------------------------------------------------------===//<br>
// Driver code<br>
@@ -6862,8 +6873,14 @@<br>
return new DarwinI386TargetInfo(Triple);<br>
<br>
switch (os) {<br>
- case llvm::Triple::Linux:<br>
- return new LinuxTargetInfo<X86_32TargetInfo>(Triple);<br>
+ case llvm::Triple::Linux: {<br>
+ switch (Triple.getEnvironment()) {<br>
+ default:<br>
+ return new LinuxTargetInfo<X86_32TargetInfo>(Triple);<br>
+ case llvm::Triple::Android:<br>
+ return new AndroidX86_32TargetInfo(Triple);<br>
+ }<br>
+ }<br>
case llvm::Triple::DragonFly:<br>
return new DragonFlyBSDTargetInfo<X86_32TargetInfo>(Triple);<br>
case llvm::Triple::NetBSD:<br>
<br>
EMAIL PREFERENCES<br>
<a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
<br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div>