Soft-float cleanup
- UseSoftFloat target option is removed from upstream. Remove its use
and update the comment on how to skip FPU and use software
floating-point.
- Remove a stale FIXME about auto-detecting the presence of hardware
FPU. It is unlikely that any processor doesn't have an FPU these
days.
- When generating code use soft-float ABI. This matches what is done
for ARM in the rest of Android.
Change-Id: I1255ca9d30dd0e08d4de0a01cdc8bd9317a16332
diff --git a/slang_backend.cpp b/slang_backend.cpp
index 4295e9c..ff41367 100644
--- a/slang_backend.cpp
+++ b/slang_backend.cpp
@@ -138,15 +138,10 @@
// Target Machine Options
llvm::TargetOptions Options;
- // Use hardware FPU.
- //
- // FIXME: Need to detect the CPU capability and decide whether to use softfp.
- // To use softfp, change following 2 lines to
- //
- // Options.FloatABIType = llvm::FloatABI::Soft;
- // Options.UseSoftFloat = true;
- Options.FloatABIType = llvm::FloatABI::Hard;
- Options.UseSoftFloat = false;
+ // Use soft-float ABI for ARM (which is the target used by Slang during code
+ // generation). Codegen still uses hardware FPU by default. To use software
+ // floating point, add 'soft-float' feature to FeaturesStr below.
+ Options.FloatABIType = llvm::FloatABI::Soft;
// BCC needs all unknown symbols resolved at compilation time. So we don't
// need any relocation model.