I'm experiencing an INTERNAL COMPILER ERROR in MSVC-2017 (latest version 19.13.26129 for x86) when compiling volk/lib/volk_machine_sse2_mmx.c.
Function volk_32f_index_max_16u_a_sse(), ref: https://www.gnuradio.org/doc/doxygen-3.7.2.1/volk__32f__index__max__16u_8h_source.html at lines 70 - 122. Is anybody else having troubles with this? A fix for me was to remove all '-O..' flags when compiling this file. No problems with any other files. Or use the attached patch. This "optimizer bug" has been reported here: https://developercommunity.visualstudio.com/content/problem/237802/optimizer-bug-still-persists.html -- --gv
--- a/kernels/volk/volk_32f_index_max_16u.h 2016-07-28 15:53:26 +++ b/kernels/volk/volk_32f_index_max_16u.h 2018-06-25 11:28:31 @@ -143,6 +143,23 @@ #include <xmmintrin.h> +/* + * To bypass an Optimizer bug in MSVC-2017. + * Ref: + * https://developercommunity.visualstudio.com/content/problem/215602/new-optimizer-code-generation-bug.html + * + * Turn off all optimizations for this function. + */ +#if defined(_MSC_VER) && !defined(__clang__) + #define OPTIMIZE_OFF() __pragma (optimize ("g", off)); + #define OPTIMIZE_DEF() __pragma (optimize ("", on)); +#else + #define OPTIMIZE_OFF() + #define OPTIMIZE_DEF() +#endif + +OPTIMIZE_OFF() + static inline void volk_32f_index_max_16u_a_sse(uint16_t* target, const float* src0, uint32_t num_points) @@ -200,6 +217,8 @@ target[0] = (uint16_t)index; } +OPTIMIZE_DEF() + #endif /*LV_HAVE_SSE*/
_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio