[llvm-commits] [llvm] r165791 - /llvm/trunk/tools/lli/lli.cpp
Tim Northover
Tim.Northover at arm.com
Fri Oct 12 02:55:14 PDT 2012
Author: tnorthover
Date: Fri Oct 12 04:55:13 2012
New Revision: 165791
URL: http://llvm.org/viewvc/llvm-project?rev=165791&view=rev
Log:
Add float-abi and softfloat options to lli
Patch by Amara Emerson.
Modified:
llvm/trunk/tools/lli/lli.cpp
Modified: llvm/trunk/tools/lli/lli.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/lli/lli.cpp?rev=165791&r1=165790&r2=165791&view=diff
==============================================================================
--- llvm/trunk/tools/lli/lli.cpp (original)
+++ llvm/trunk/tools/lli/lli.cpp Fri Oct 12 04:55:13 2012
@@ -171,6 +171,23 @@
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 @@
}
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())
More information about the llvm-commits
mailing list