[cfe-commits] r154389 - in /cfe/trunk: lib/Driver/Tools.cpp test/Driver/linux-as.c
Evgeniy Stepanov
eugeni.stepanov at gmail.com
Tue Apr 10 02:05:41 PDT 2012
Author: eugenis
Date: Tue Apr 10 04:05:40 2012
New Revision: 154389
URL: http://llvm.org/viewvc/llvm-project?rev=154389&view=rev
Log:
Pass -march, -mcpu, -mfpu to linuxtools assembler.
Added:
cfe/trunk/test/Driver/linux-as.c
Modified:
cfe/trunk/lib/Driver/Tools.cpp
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=154389&r1=154388&r2=154389&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Tue Apr 10 04:05:40 2012
@@ -5089,6 +5089,10 @@
CmdArgs.push_back("-EL");
}
+ Args.AddLastArg(CmdArgs, options::OPT_march_EQ);
+ Args.AddLastArg(CmdArgs, options::OPT_mcpu_EQ);
+ Args.AddLastArg(CmdArgs, options::OPT_mfpu_EQ);
+
Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA,
options::OPT_Xassembler);
Added: cfe/trunk/test/Driver/linux-as.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/linux-as.c?rev=154389&view=auto
==============================================================================
--- cfe/trunk/test/Driver/linux-as.c (added)
+++ cfe/trunk/test/Driver/linux-as.c Tue Apr 10 04:05:40 2012
@@ -0,0 +1,31 @@
+// Check passing options to the assembler for ARM targets.
+//
+// RUN: %clang -target arm-linux -### \
+// RUN: -no-integrated-as -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=ARM %s
+// CHECK-ARM: as{{(.exe)?}}"
+//
+// RUN: %clang -target arm-linux -mcpu=cortex-a8 -### \
+// RUN: -no-integrated-as -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=ARM-MCPU %s
+// CHECK-ARM-MCPU: as{{(.exe)?}}" "-mcpu=cortex-a8"
+//
+// RUN: %clang -target arm-linux -mfpu=neon -### \
+// RUN: -no-integrated-as -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=ARM-MFPU %s
+// CHECK-ARM-MFPU: as{{(.exe)?}}" "-mfpu=neon"
+//
+// RUN: %clang -target arm-linux -march=armv7-a -### \
+// RUN: -no-integrated-as -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=ARM-MARCH %s
+// CHECK-ARM-MARCH: as{{(.exe)?}}" "-march=armv7-a"
+//
+// RUN: %clang -target arm-linux -mcpu=cortex-a8 -mfpu=neon -march=armv7-a -### \
+// RUN: -no-integrated-as -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=ARM-ALL %s
+// CHECK-ARM-ALL: as{{(.exe)?}}" "-march=armv7-a" "-mcpu=cortex-a8" "-mfpu=neon"
+//
+// RUN: %clang -target armv7-linux -mcpu=cortex-a8 -### \
+// RUN: -no-integrated-as -c %s 2>&1 \
+// RUN: | FileCheck -check-prefix=ARM-TARGET %s
+// CHECK-ARM-TARGET: as{{(.exe)?}}" "-mfpu=neon" "-mcpu=cortex-a8"
More information about the cfe-commits
mailing list