lvqcl
2014-Jan-03 14:32 UTC
[flac-dev] PATCH: add FLAC__SSE_SUPPORTED and FLAC__SSE2_SUPPORTED
Currently the only way to compile FLAC using GCC w/o SSE support is to disable asm optimizations (see configure.ac): if test "x$asm_optimisation" = "xyes" ; then XIPH_ADD_CFLAGS([-msse2]) fi Also it's not possible to enable SSE4.1 intrinsic functions even with -msse4.1 option. The patch fixes both problems. --------------- BTW: I'm not sure that share/compat.h is the best place to define these FLAC__SSEN_SUPPORTED macros. Maybe it's better to move them to some libFLAC .h file? E.g. to src/libFLAC/include/private/cpu.h? -------------- next part -------------- A non-text attachment was scrubbed... Name: sse_support.patch Type: application/octet-stream Size: 10488 bytes Desc: not available Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20140103/343e2b24/attachment.obj
Erik de Castro Lopo
2014-Jan-17 20:26 UTC
[flac-dev] PATCH: add FLAC__SSE_SUPPORTED and FLAC__SSE2_SUPPORTED
Hi lvqcl, Sorry to take so long to repond to this. lvqcl wrote:> Currently the only way to compile FLAC using GCC w/o SSE support > is to disable asm optimizations (see configure.ac): > > if test "x$asm_optimisation" = "xyes" ; then > XIPH_ADD_CFLAGS([-msse2]) > fi > > > Also it's not possible to enable SSE4.1 intrinsic functions even > with -msse4.1 option. The patch fixes both problems. > > > --------------- > BTW: I'm not sure that share/compat.h is the best place to define these > FLAC__SSEN_SUPPORTED macros. Maybe it's better to move them to some libFLAC .h file? > E.g. to src/libFLAC/include/private/cpu.h?Yes, I think src/libFLAC/include/private/cpu.h would be a better place for this SSE version support stuff. Would you be able to do it or should I? Cheers, Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
lvqcl
2014-Jan-19 18:17 UTC
[flac-dev] PATCH: add FLAC__SSE_SUPPORTED and FLAC__SSE2_SUPPORTED
Erik de Castro Lopo wrote:> Yes, I think src/libFLAC/include/private/cpu.h would be a better place > for this SSE version support stuff. > > Would you be able to do it or should I?OK, the attached patch adds FLAC__SSE*_SUPPORTED and also moves their definitions to cpu.h. It also adds GCC 4.9 support (http://gcc.gnu.org/gcc-4.9/changes.html: "It is now possible to call x86 intrinsics from select functions in a file that are tagged with the corresponding target attribute without having to compile the entire file with the -mxxx option") I also found that I wrote "#ifdef _MSC_VER" instead of "#if defined _MSC_VER || defined __INTEL_COMPILER". The second attached patch fixes this. -------------- next part -------------- A non-text attachment was scrubbed... Name: 1_sse_support.patch Type: application/octet-stream Size: 17298 bytes Desc: not available Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20140119/4ba3d1b7/attachment-0002.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: 2_ifdefs.patch Type: application/octet-stream Size: 2798 bytes Desc: not available Url : http://lists.xiph.org/pipermail/flac-dev/attachments/20140119/4ba3d1b7/attachment-0003.obj
Maybe Matching Threads
- PATCH: add FLAC__SSE_SUPPORTED and FLAC__SSE2_SUPPORTED
- Distributing llc and opt with own package?
- Distributing llc and opt with own package?
- crash on lpc_restore_signal_16_intrin_sse2
- [PATCH 1/1] ensure that stack is aligned for SSE functions if using mingw32