mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 00:32:55 +00:00
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
This commit is contained in:
parent
8ab27a3514
commit
77b4c69165
@ -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())
|
||||
|
Loading…
x
Reference in New Issue
Block a user