Predefine version D_HardFloat instead of D_SoftFloat for -float-abi=softfp (#2678)

Matching the D_HardFloat semantics: 'the target hardware has a floating
point unit'.
This commit is contained in:
Martin Kinkelin 2018-05-11 14:39:12 +02:00 committed by GitHub
parent 7464d8449f
commit 0cd14bf80e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 59 additions and 21 deletions

View file

@ -35,10 +35,11 @@ public:
const bool is64 = global.params.is64bit;
auto tripleString = is64 ? "nvptx64-nvidia-cuda" : "nvptx-nvidia-cuda";
auto floatABI = ::FloatABI::Hard;
targetMachine = createTargetMachine(
tripleString, is64 ? "nvptx64" : "nvptx",
"sm_" + ldc::to_string(tversion / 10), {},
is64 ? ExplicitBitness::M64 : ExplicitBitness::M32, ::FloatABI::Hard,
is64 ? ExplicitBitness::M64 : ExplicitBitness::M32, floatABI,
llvm::Reloc::Static, llvm::CodeModel::Medium, codeGenOptLevel(), false);
_ir = new IRState("dcomputeTargetCUDA", ctx);