Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--man/mono.14
-rw-r--r--mono/mini/mini-arm.c21
2 files changed, 21 insertions, 4 deletions
diff --git a/man/mono.1 b/man/mono.1
index f87188c3d0d..07f7192b75d 100644
--- a/man/mono.1
+++ b/man/mono.1
@@ -970,6 +970,10 @@ where V is the architecture number 4, 5, 6, 7 and the options can be currently b
.fi
.TP
+\fBMONO_ARM_FORCE_SOFT_FLOAT\fR
+When Mono is built with a soft float fallback on ARM and this variable is set to
+"1", Mono will always emit soft float code, even if a VFP unit is detected.
+.TP
\fBMONO_DISABLE_AIO\fR
If set, tells mono NOT to attempt using native asynchronous I/O services. In
that case, a default select/poll implementation is used. Currently only epoll()
diff --git a/mono/mini/mini-arm.c b/mono/mini/mini-arm.c
index 06456fdd7ab..fe1cc21b738 100644
--- a/mono/mini/mini-arm.c
+++ b/mono/mini/mini-arm.c
@@ -954,12 +954,25 @@ mono_arch_init (void)
arm_fpu = MONO_ARM_FPU_VFP;
#if defined(ARM_FPU_NONE) && !defined(__APPLE__)
- /* If we're compiling with a soft float fallback and it
- turns out that no VFP unit is available, we need to
- switch to soft float. We don't do this for iOS, since
- iOS devices always have a VFP unit. */
+ /*
+ * If we're compiling with a soft float fallback and it
+ * turns out that no VFP unit is available, we need to
+ * switch to soft float. We don't do this for iOS, since
+ * iOS devices always have a VFP unit.
+ */
if (!mono_hwcap_arm_has_vfp)
arm_fpu = MONO_ARM_FPU_NONE;
+
+ /*
+ * This environment variable can be useful in testing
+ * environments to make sure the soft float fallback
+ * works. Most ARM devices have VFP units these days, so
+ * normally soft float code would not be exercised much.
+ */
+ const char *soft = g_getenv ("MONO_ARM_FORCE_SOFT_FLOAT");
+
+ if (!strncmp (soft, "1", 1))
+ arm_fpu = MONO_ARM_FPU_NONE;
#endif
#endif