[flac-dev] Questions about libFLAC and SSE/SSE2/...

lvqcl.mail lvqcl.mail at gmail.com
Fri Dec 2 20:30:52 UTC 2016


1.
A program can use SSE instructions only if both CPU and OS support SSE.
Currently libFLAC tests both CPU and OS for this support, but is it really
necessary? Maybe CPU check is enough? Operating systems that don't support
SSE (Win95, WinNT 4.0, Linux kernel 2.2 (iirc), ...) are really outdated
now. Removing OS check will greatly simplify src/libFLAC/cpu.c.


2.
"configure" build system adds -msse2 option by default. It means that
x86 (32-bit) library won't work on older, non-SSE2 processors. So if
somebody wants to build a universal x86 binary then it's necessary to
add --disable-sse (for Linux) or even --disable-asm-optimizations (for
other OSes).
Debian adds "--disable-asm-optimizations --disable-sse --disable-altivec"
to OPTFLAGS (see /debian/rules file inside
  <http://http.debian.net/debian/pool/main/f/flac/flac_1.3.1-4.debian.tar.xz>  
)
FreeBSD just comments out this option:
<https://svnweb.freebsd.org/ports/head/audio/flac/files/patch-configure?view=markup#l28>

Maybe it makes sense to remove this option?


3.
What's the intended meaning of --enable-sse / --disable-sse options?
What should they do/enable/disable?


More information about the flac-dev mailing list