Is Nasm always available when the target architecture is IA-32? For example, FLAC has FLAC__lpc_compute_autocorrelation_asm_ia32_sse_lag_NN() functions that require NASM presence, and FLAC__lpc_compute_autocorrelation_intrin_sse_lag_NN() functions that require x86 intrinsics support. FLAC makes use of the former (if NASM is available) but doesn't try to use the latter when NASM is not found. Or does it make sence to add the following code: #ifdef FLAC__HAS_X86INTRIN #if defined FLAC__SSE_SUPPORTED && !defined FLAC__HAS_NASM if(encoder->private_->cpuinfo.ia32.sse) { encoder->private_->local_lpc_compute_autocorrelation = FLAC__lpc_compute_autocorrelation_intrin_sse_lag_NN; ... ... } #endif #endif
lvqcl wrote:> Is Nasm always available when the target architecture is IA-32?Not it is not always available. On most Linux systems it is an optional install.> For example, FLAC has FLAC__lpc_compute_autocorrelation_asm_ia32_sse_lag_NN() functions > that require NASM presence, and FLAC__lpc_compute_autocorrelation_intrin_sse_lag_NN() > functions that require x86 intrinsics support. > > FLAC makes use of the former (if NASM is available) but doesn't try to use > the latter when NASM is not found. > > > Or does it make sence to add the following code:Yes it does. Cheers, Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
Erik de Castro Lopo wrote:>> Or does it make sence to add the following code: > > Yes it does.The patch is attached. -------------- next part -------------- A non-text attachment was scrubbed... Name: intrin_if_no_nasm.patch Type: application/octet-stream Size: 1427 bytes Desc: not available Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20140201/c2d5a707/attachment-0001.obj