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

Erik de Castro Lopo mle+la at mega-nerd.com
Sat Dec 3 00:38:17 UTC 2016


lvqcl.mail wrote:

> 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.

That makes sense.

> 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>  
> )

It does that depending on the architecture. Since Debian won't be supporting
i386 for the next release, I wonder how important that is.

> 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?

Without knowing why FreeBSD disabled it, I'd prefer not to change it.

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

I really could not tell you without reading configure.ac and the code.

Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/


More information about the flac-dev mailing list