Displaying 1 result from an estimated 1 matches for "indivbl_read64".
2018 May 24
0
X86 Intrinsics : _mm_storel_epi64/ _mm_loadl_epi64 with -m32
..._m128i instead of uint64_t everywhere, then the read and write happen
as 64-bit operations using the xmm registers as expected.
void indvbl_write64(volatile void *p, uint64_t v)
{
__m128i tmp = _mm_loadl_epi64((__m128i const *)&v);
_mm_storel_epi64((__m128i *)p, tmp);
}
uint64_t indivbl_read64 (volatile void *p)
{
__m128i tmp = _mm_loadl_epi64((__m128i const *)p);
return *(uint64_t *)&tmp;
}
Options used to compile: clang –O2 –c –msse4.2 –m32 test.c
Generated code:
00000000 <indvbl_write64>:
0: 8b 44 24 08 mov 0x8(%esp),%eax
4: 8b 54 24...