Hi Daniel,

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?

Thanks,
Nico


On Wed, Mar 16, 2011 at 5:07 PM, Daniel Dunbar <[email protected]> wrote:

> Author: ddunbar
> Date: Wed Mar 16 19:07:34 2011
> New Revision: 127777
>
> URL: http://llvm.org/viewvc/llvm-project?rev=127777&view=rev
> Log:
> Driver/ARM: Match GCC behavior in that -msoft-float disables NEON, despite
> this
> not being consistent at all with other parts of the GCC implementation.
>
> Modified:
>     cfe/trunk/lib/Driver/Tools.cpp
>     cfe/trunk/test/Driver/clang-translation.c
>
> Modified: cfe/trunk/lib/Driver/Tools.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=127777&r1=127776&r2=127777&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/Driver/Tools.cpp (original)
> +++ cfe/trunk/lib/Driver/Tools.cpp Wed Mar 16 19:07:34 2011
> @@ -583,6 +583,13 @@
>      } else
>        D.Diag(clang::diag::err_drv_clang_unsupported) <<
> A->getAsString(Args);
>    }
> +
> +  // Setting -msoft-float effectively disables NEON because of the GCC
> +  // implementation, although the same isn't true of VFP or VFP3.
> +  if (FloatABI == "soft") {
> +      CmdArgs.push_back("-target-feature");
> +      CmdArgs.push_back("-neon");
> +  }
>  }
>
>  void Clang::AddMIPSTargetArgs(const ArgList &Args,
>
> Modified: cfe/trunk/test/Driver/clang-translation.c
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/clang-translation.c?rev=127777&r1=127776&r2=127777&view=diff
>
> ==============================================================================
> --- cfe/trunk/test/Driver/clang-translation.c (original)
> +++ cfe/trunk/test/Driver/clang-translation.c Wed Mar 16 19:07:34 2011
> @@ -31,6 +31,8 @@
>  // ARMV7_SOFTFLOAT: "-cc1"
>  // ARMV7_SOFTFLOAT: "-msoft-float"
>  // ARMV7_SOFTFLOAT: "-mfloat-abi" "soft"
> +// ARMV7_SOFTFLOAT: "-target-feature"
> +// ARMV7_SOFTFLOAT: "-neon"
>  // ARMV7_SOFTFLOAT: "-x" "c"
>
>  // RUN: %clang -ccc-host-triple x86_64-apple-darwin10 -### -S %s 2>
> %t.log \
>
>
> _______________________________________________
> cfe-commits mailing list
> [email protected]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to