<div dir="ltr">Hah!<div><br></div><div>I was probably comparing vs Apple GCC at the time, but that doesn't answer the question either way. To know the right fix you could consult GCC and see how it comes up with the answer; Clang should probably match that. If you don't want to dig through the GCC ARM driver I'd add an Android specific change just to limit the scope.<div>
<br></div><div> - Daniel</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jul 25, 2014 at 1:42 PM, Nico Weber <span dir="ltr"><<a href="mailto:thakis@chromium.org" target="_blank">thakis@chromium.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Daniel,<div><br></div><div>sorry about the over 3 year old review comment, but: Should this only be done on Darwin? FloatABI defaults to "soft" on Android, so -mfpu=neon doesn't have an effect by default when targeting android which was fairly surprising to me (and doesn't match gcc). Is the fix to only do this thing here on darwin, or is the fix to not do it on android?</div>

<div><br>Thanks,</div><div>Nico</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Mar 16, 2011 at 5:07 PM, Daniel Dunbar <span dir="ltr"><<a href="mailto:daniel@zuster.org" target="_blank">daniel@zuster.org</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: ddunbar<br>
Date: Wed Mar 16 19:07:34 2011<br>
New Revision: 127777<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=127777&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=127777&view=rev</a><br>
Log:<br>
Driver/ARM: Match GCC behavior in that -msoft-float disables NEON, despite this<br>
not being consistent at all with other parts of the GCC implementation.<br>
<br>
Modified:<br>
    cfe/trunk/lib/Driver/Tools.cpp<br>
    cfe/trunk/test/Driver/clang-translation.c<br>
<br>
Modified: cfe/trunk/lib/Driver/Tools.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=127777&r1=127776&r2=127777&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=127777&r1=127776&r2=127777&view=diff</a><br>


==============================================================================<br>
--- cfe/trunk/lib/Driver/Tools.cpp (original)<br>
+++ cfe/trunk/lib/Driver/Tools.cpp Wed Mar 16 19:07:34 2011<br>
@@ -583,6 +583,13 @@<br>
     } else<br>
       D.Diag(clang::diag::err_drv_clang_unsupported) << A->getAsString(Args);<br>
   }<br>
+<br>
+  // Setting -msoft-float effectively disables NEON because of the GCC<br>
+  // implementation, although the same isn't true of VFP or VFP3.<br>
+  if (FloatABI == "soft") {<br>
+      CmdArgs.push_back("-target-feature");<br>
+      CmdArgs.push_back("-neon");<br>
+  }<br>
 }<br>
<br>
 void Clang::AddMIPSTargetArgs(const ArgList &Args,<br>
<br>
Modified: cfe/trunk/test/Driver/clang-translation.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/clang-translation.c?rev=127777&r1=127776&r2=127777&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/clang-translation.c?rev=127777&r1=127776&r2=127777&view=diff</a><br>


==============================================================================<br>
--- cfe/trunk/test/Driver/clang-translation.c (original)<br>
+++ cfe/trunk/test/Driver/clang-translation.c Wed Mar 16 19:07:34 2011<br>
@@ -31,6 +31,8 @@<br>
 // ARMV7_SOFTFLOAT: "-cc1"<br>
 // ARMV7_SOFTFLOAT: "-msoft-float"<br>
 // ARMV7_SOFTFLOAT: "-mfloat-abi" "soft"<br>
+// ARMV7_SOFTFLOAT: "-target-feature"<br>
+// ARMV7_SOFTFLOAT: "-neon"<br>
 // ARMV7_SOFTFLOAT: "-x" "c"<br>
<br>
 // RUN: %clang -ccc-host-triple x86_64-apple-darwin10 -### -S %s 2> %t.log \<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">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>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>