зеркало из https://github.com/microsoft/clang-1.git
Pass -mfloat-abi= to linuxtools assembler.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155191 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
8560791791
Коммит
700c508fd4
|
@ -5064,6 +5064,10 @@ void linuxtools::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
StringRef MArch = getToolChain().getArchName();
|
||||
if (MArch == "armv7" || MArch == "armv7a" || MArch == "armv7-a")
|
||||
CmdArgs.push_back("-mfpu=neon");
|
||||
|
||||
StringRef ARMFloatABI = getARMFloatABI(getToolChain().getDriver(), Args,
|
||||
getToolChain().getTriple());
|
||||
CmdArgs.push_back(Args.MakeArgString("-mfloat-abi=" + ARMFloatABI));
|
||||
} else if (getToolChain().getArch() == llvm::Triple::mips ||
|
||||
getToolChain().getArch() == llvm::Triple::mipsel ||
|
||||
getToolChain().getArch() == llvm::Triple::mips64 ||
|
||||
|
|
|
@ -3,29 +3,49 @@
|
|||
// RUN: %clang -target arm-linux -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=ARM %s
|
||||
// CHECK-ARM: as{{(.exe)?}}"
|
||||
// CHECK-ARM: as{{(.exe)?}}" "-mfloat-abi=soft"
|
||||
//
|
||||
// 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"
|
||||
// CHECK-ARM-MCPU: as{{(.exe)?}}" "-mfloat-abi=soft" "-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"
|
||||
// CHECK-ARM-MFPU: as{{(.exe)?}}" "-mfloat-abi=soft" "-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"
|
||||
// CHECK-ARM-MARCH: as{{(.exe)?}}" "-mfloat-abi=soft" "-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"
|
||||
// CHECK-ARM-ALL: as{{(.exe)?}}" "-mfloat-abi=soft" "-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"
|
||||
// CHECK-ARM-TARGET: as{{(.exe)?}}" "-mfpu=neon" "-mfloat-abi=soft" "-mcpu=cortex-a8"
|
||||
//
|
||||
// RUN: %clang -target arm-linux -mfloat-abi=hard -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=ARM-MFLOAT-ABI %s
|
||||
// CHECK-ARM-MFLOAT-ABI: as{{(.exe)?}}" "-mfloat-abi=hard"
|
||||
//
|
||||
// RUN: %clang -target arm-linux-androideabi -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=ARM-ANDROID %s
|
||||
// CHECK-ARM-ANDROID: as{{(.exe)?}}" "-mfloat-abi=soft"
|
||||
//
|
||||
// RUN: %clang -target arm-linux-androideabi -march=armv7-a -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=ARM-ANDROID-SOFTFP %s
|
||||
// CHECK-ARM-ANDROID-SOFTFP: as{{(.exe)?}}" "-mfloat-abi=softfp" "-march=armv7-a"
|
||||
//
|
||||
// RUN: %clang -target arm-linux-eabi -mhard-float -### \
|
||||
// RUN: -no-integrated-as -c %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=ARM-HARDFP %s
|
||||
// CHECK-ARM-HARDFP: as{{(.exe)?}}" "-mfloat-abi=hard"
|
||||
|
|
Загрузка…
Ссылка в новой задаче