aboutsummaryrefslogtreecommitdiff
path: root/tools/lli
diff options
context:
space:
mode:
authorTim Northover <Tim.Northover@arm.com>2012-10-12 09:55:13 +0000
committerTim Northover <Tim.Northover@arm.com>2012-10-12 09:55:13 +0000
commit77b4c69165090dcbf60e20492e41479489f64a6c (patch)
tree7407df773e59d95ed3e923d652d5dbed353fc851 /tools/lli
parent8ab27a35143bdd8882338781dd0c9c69be784b50 (diff)
Add float-abi and softfloat options to lli
Patch by Amara Emerson. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165791 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lli')
-rw-r--r--tools/lli/lli.cpp28
1 files changed, 26 insertions, 2 deletions
diff --git a/tools/lli/lli.cpp b/tools/lli/lli.cpp
index 57a31f21b8..0ee72387b8 100644
--- a/tools/lli/lli.cpp
+++ b/tools/lli/lli.cpp
@@ -171,6 +171,23 @@ namespace {
cl::init(false));
cl::opt<bool>
+ GenerateSoftFloatCalls("soft-float",
+ cl::desc("Generate software floating point library calls"),
+ cl::init(false));
+
+ cl::opt<llvm::FloatABI::ABIType>
+ FloatABIForCalls("float-abi",
+ cl::desc("Choose float ABI type"),
+ cl::init(FloatABI::Default),
+ cl::values(
+ clEnumValN(FloatABI::Default, "default",
+ "Target default float ABI type"),
+ clEnumValN(FloatABI::Soft, "soft",
+ "Soft float ABI (implied by -soft-float)"),
+ clEnumValN(FloatABI::Hard, "hard",
+ "Hard float ABI (uses FP registers)"),
+ clEnumValEnd));
+ cl::opt<bool>
// In debug builds, make this default to true.
#ifdef NDEBUG
#define EMIT_DEBUG false
@@ -555,15 +572,22 @@ int main(int argc, char **argv, char * const *envp) {
}
builder.setOptLevel(OLvl);
+ TargetOptions Options;
+ Options.UseSoftFloat = GenerateSoftFloatCalls;
+ if (FloatABIForCalls != FloatABI::Default)
+ Options.FloatABIType = FloatABIForCalls;
+ if (GenerateSoftFloatCalls)
+ FloatABIForCalls = FloatABI::Soft;
+
// Remote target execution doesn't handle EH or debug registration.
if (!RemoteMCJIT) {
- TargetOptions Options;
Options.JITExceptionHandling = EnableJITExceptionHandling;
Options.JITEmitDebugInfo = EmitJitDebugInfo;
Options.JITEmitDebugInfoToDisk = EmitJitDebugInfoToDisk;
- builder.setTargetOptions(Options);
}
+ builder.setTargetOptions(Options);
+
EE = builder.create();
if (!EE) {
if (!ErrorMsg.empty())