diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-12-19 04:15:38 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-12-19 04:15:38 +0000 |
commit | 97f52ac45369f6925b548404e61d511034c874ec (patch) | |
tree | 1b7ac4e44deb2bbc1d01351952bed977b19ac683 /lib/Driver/Tools.cpp | |
parent | b93292ab7f2b3d43a9e0ad6421f572d1f5a323b4 (diff) |
ARM: Use front-end specific target features "soft-float" and "soft-float-abi" to communicate FP mode to target; __SOFTFP__ is set correctly now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91755 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r-- | lib/Driver/Tools.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index b1846b34c2..3dcdbbceca 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -230,7 +230,7 @@ static const char *getARMTargetCPU(const ArgList &Args) { if (MArch == "armv5e" || MArch == "armv5te") return "arm1026ejs"; if (MArch == "armv5tej") - return "arm926ejs"; + return "arm926ej-s"; if (MArch == "armv6" || MArch == "armv6k") return "arm1136jf-s"; if (MArch == "armv6j") @@ -432,6 +432,24 @@ void Clang::AddARMTargetArgs(const ArgList &Args, CmdArgs.push_back("-mfloat-abi"); CmdArgs.push_back("hard"); } + + // Set appropriate target features for floating point mode. + // + // FIXME: Note, this is a hack, the LLVM backend doesn't actually use these + // yet (it uses the -mfloat-abi and -msoft-float options above), and it is + // stripped out by the ARM target. + + // Use software floating point operations? + if (FloatABI == "soft") { + CmdArgs.push_back("-target-feature"); + CmdArgs.push_back("+soft-float"); + } + + // Use software floating point argument passing? + if (FloatABI != "hard") { + CmdArgs.push_back("-target-feature"); + CmdArgs.push_back("+soft-float-abi"); + } } void Clang::AddX86TargetArgs(const ArgList &Args, |