On 10/30/2014 09:45 PM, Raine M. Ekman wrote:
>
> Here's what I believe after some googling in the matter:
> 1. Setting the CPU flags is possible without fast-math. And for most
> CPUs it's enough, too: http://carlh.net/plugins/denormals.php
>
> 2. This is really only about building win32 binaries:
> - All x86-64 CPUs are at least SSE2 with the DAZ flag -> it should
> always be on in 64-bit binaries.
> - All Intel Macs are at least SSE3, so that would be a good level to
> use for building the OSX port. (maybe that's already taken care of?)
> - On Linux, distros/packagers will continue to have the choice to
> build for a 80386 with software 387 emulation.
>
> 3. Some (not sure how many) 32-bit CPUs with SSE2 don't have the DAZ
> flag and will crash the program trying to set it. Some options:
> - Either set both DAZ and FTZ flags and make the CPU requirement "SSE2
> with
> DAZ", or...
> - set just the FTZ flag in 32-bit builds, possibly drop the CPU
> requirement
> to SSE level (Athlon XP and P3 users will be happy!), or...
> - detect CPU features at runtime and set the appropriate flag(s) (some
> assembly required, I think).


Ok... what about non-x86 architectures, such as ARM? I'm not sure if
LMMS runs on ARM, if anyone has any ARM hardware, it'd be great if they
could try out compiling LMMS on it. This is a secondary concern though,
as we can just #ifdef it if it becomes an issue.


>
>
> Here's how the CAPS plugins do it
> (plugins/LadspaEffect/caps/Descriptor.h):
>          #ifdef __SSE3__
>          /* DAZ flag */
>          _MM_SET_DENORMALS_ZERO_MODE (_MM_DENORMALS_ZERO_ON);
>          #endif
>          #ifdef __SSE__
>          /* FTZ flag */
>          _MM_SET_FLUSH_ZERO_MODE (_MM_FLUSH_ZERO_ON);
>          #endif


Seems like a good solution to me... the win binaries can then be built
as the SSE version.

Want to put out a patch for this on master? You seem to have the knowhow
for this stuff... ;)




------------------------------------------------------------------------------
_______________________________________________
LMMS-devel mailing list
LMMS-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lmms-devel

Reply via email to