xsimd icon indicating copy to clipboard operation
xsimd copied to clipboard

Wrong size for char* overwrite

Open nick-dumas opened this issue 7 years ago • 1 comments

For the types specified in: xsimd_avx_double.hpp, xsimd_sse_float.hpp and xsimd_sse_int32.hpp

The SSE method store_aligned_int32(uint8_t* dst) (and similar) stores using the function _mm_storel_epi64. As this is a batch of 4 values, and each value will be saved to a single byte, this is 32 bits not 64 bits. I believe the correct function should be _mm_cvtsi128_si32 or _mm_storeu_si32.

nick-dumas avatar Jun 01 '19 18:06 nick-dumas

_mm_storel_epi64 is now only used in the context of the last step of a reduce_add on i686, which is a totally legit usage. I believe this issue is now obsolete, closing it.

serge-sans-paille avatar Oct 16 '22 06:10 serge-sans-paille