r211688 - Align with new GCC options for x86 Android
Alexey Volkov
avolkov.intel at gmail.com
Wed Jun 25 05:15:36 PDT 2014
Author: volkalex
Date: Wed Jun 25 07:15:36 2014
New Revision: 211688
URL: http://llvm.org/viewvc/llvm-project?rev=211688&view=rev
Log:
Align with new GCC options for x86 Android
32-bit: +ssse3
64-bit: +sse4.2 +popcnt
Differential Revision: http://reviews.llvm.org/D4287
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=211688&r1=211687&r2=211688&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Wed Jun 25 07:15:36 2014
@@ -1426,9 +1426,13 @@ static void getX86TargetFeatures(const l
Features.push_back("-fsgsbase");
}
+ // Add features to comply with gcc on Android
if (Triple.getEnvironment() == llvm::Triple::Android) {
- // Add sse3 feature to comply with gcc on Android
- Features.push_back("+sse3");
+ if (Triple.getArch() == llvm::Triple::x86_64) {
+ Features.push_back("+sse4.2");
+ Features.push_back("+popcnt");
+ } else
+ Features.push_back("+ssse3");
}
// Now add any that the user explicitly requested on the command line,
Modified: cfe/trunk/test/Driver/clang-translation.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/clang-translation.c?rev=211688&r1=211687&r2=211688&view=diff
==============================================================================
--- cfe/trunk/test/Driver/clang-translation.c (original)
+++ cfe/trunk/test/Driver/clang-translation.c Wed Jun 25 07:15:36 2014
@@ -211,14 +211,15 @@
// RUN: | FileCheck --check-prefix=ANDROID-X86 %s
// ANDROID-X86: clang
// ANDROID-X86: "-target-cpu" "i686"
-// ANDROID-X86: "-target-feature" "+sse3"
+// ANDROID-X86: "-target-feature" "+ssse3"
// RUN: %clang -target x86_64-linux-android -### -S %s 2>&1 \
// RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \
// RUN: | FileCheck --check-prefix=ANDROID-X86_64 %s
// ANDROID-X86_64: clang
// ANDROID-X86_64: "-target-cpu" "x86-64"
-// ANDROID-X86_64: "-target-feature" "+sse3"
+// ANDROID-X86_64: "-target-feature" "+sse4.2"
+// ANDROID-X86_64: "-target-feature" "+popcnt"
// RUN: %clang -target mips-linux-gnu -### -S %s 2>&1 | \
// RUN: FileCheck -check-prefix=MIPS %s
More information about the cfe-commits
mailing list