[openal] Recent 32-bit updates

Chris Robinson chris.kcat at gmail.com
Mon Jul 16 23:33:54 EDT 2018


Hi,

This update is to let people know that now*, by default 32-bit builds 
will use SSE2 code generation for floating-point (so long as the 
compiler accepts -msse2 and -mfpmath=sse) or SSE code generation (if the 
compiler otherwise accepts -msse and -mfpmath=sse), and so will require 
a CPU with SSE2 support. This can be disabled at compile time by setting 
the new ALSOFT_ENABLE_SSE2_CODEGEN and ALSOFT_ENABLE_SSE_CODEGEN CMake 
options to FALSE. Setting just ALSOFT_ENABLE_SSE2_CODEGEN to FALSE will 
enable SSE1 codegen, which will use the SSE unit for single-precision 
float operations and fall back to x87 opcodes for working on doubles.

* I believe MSVC always defaults to SSE2 codegen, even for 32-bit. This 
doesn't change anything about that. This also shouldn't change anything 
with ARM/Android, which uses NEON instead of x87 or SSE. This only 
affects 32-bit with GCC and Clang, on whatever targets accept the -msse 
and -mfpmath=sse switches.

The main purpose for this as discussed in previous messages is to 
improve 32-bit performance by avoiding expensive denormal calculations 
on the x87 FPU, whereas the SSE unit can disable them in the 
performance-sensitive mixer. Any non-ancient CPU should support SSE2; 
it's required for 64-bit CPUs, and has been available since even before 
they became the norm. If you still desire a generic 32-bit build that 
doesn't assume SSE or SSE2 support, it can be disabled with the 
aforementioned build options.


Thanks for reading, and please let me know if there are any issues with 
this.


More information about the openal mailing list