[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mono-devel-list
Subject:    Re: [Mono-dev] arm fpu runtime selection
From:       Geoff Norton <gnorton () novell ! com>
Date:       2010-06-20 5:53:44
Message-ID: 99B23F64-F5DC-4AF9-A97F-5BE9CD2CBAFD () novell ! com
[Download RAW message or body]


On 2010-06-20, at 1:02 AM, Rodrigo Kumpera wrote:

> I think we can simplify your approach to a much more localized change:
> 
> 
> #ifdef MONO_ARCH_SOFT_FLOAT
> #define COMPILE_SOFT_FLOAT(cfg) ((cfg)->use_soft_float)
> #else
> #define COMPILE_SOFT_FLOAT(cfg) 0
> #endif
> 
> 
> And then on mini_method_compile:
> 
> #ifdef MONO_ARCH_SOFT_FLOAT
> cfg->use_soft_float = mono_arch_is_soft_float () && !COMPILE_LLVM (cfg);
> #endif
> 
> Then it's a matter of replacing all checks for MONO_ARCH_SOFT_FLOAT to checks for \
> COMPILE_SOFT_FLOAT(cfg). 
> This approach relies on a minimally decent compiler capable of eliminating trivial \
> dead code which IMHO is something we must assume to be true in 2010.
> 

The goal here is to support a runtime-selectable FPU mode (soft or hard) on \
architectures that support it.  I could restrict this back to a few archs, but I \
figured that I'd go broader at first to catch the general case for other arch's, but \
if you'd rather be more restrictive (ie; target this to an arm define for now and \
follow the above) I'm ok with that.

> I'm not a big fan of the mono_arch_is_soft_float bit. I would rather cleanup and \
> unify this with simd and cpu-specific ops into a single cpu caps thing.
> 
> If we unify the above three, supporting AOT would be a matter of changing the \
> initialization code to read a supplied argument that override auto-detected caps. \
> This would be a great addition to help testing those runtime selectable features. I \
> should have done it for Mono.Simd so our build bot could test it running on less \
> capable hardware. 

Agreed, a general caps facility makes sense, but I wanted to localize the change for \
the first patch, and we can discuss unifying simd/fpu/etc into a caps facility that \
ties into AOT next?

> The only thing that would be very hard would be supporting runtime-selectable FPU \
> under AOT. Well, not really, that would a minor enhancement over soft-float. 
> By the way, what's the use of runtime selectable FPU mode for JIT'd code if we \
> don't do the same for the runtime itself?

Android for instance uses -mfloat-abi=soft everywhere, but each arch can take \
advantage of a hardware fpu if available outside the calling conv rules.  I'd rather \
not target soft float on hardware that can accelerate it.

-g

_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic