[Issue 8047] important opcodes missing from core/simd.d
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jan 7 13:55:33 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=8047
ponce <aliloko at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |aliloko at gmail.com
--- Comment #7 from ponce <aliloko at gmail.com> ---
Hello,
Can't implement the following intrinsics for DMD:
_mm_movemask_ps needs MOVMSKPS support, as Marco Leise said 7 years ago it is
an instruction that return in a general purpose register instead of an XMM
register.
----------------------------------------------------
int _mm_movemask_ps (__m128 a) pure @trusted
{
static if (DMD_with_DSIMD)
{
// suggested API ? This API returning an int doesn't exist in core.simd
int res = __simd_int(XMM.MOVMSKPS, a);
return res;
}
else static if (GDC_with_SSE)
{
return __builtin_ia32_movmskps(a);
}
else static if (LDC_with_SSE1)
{
return __builtin_ia32_movmskps(a);
}
else
{
int4 ai = cast(int4)a;
int r = 0;
if (ai.array[0] < 0) r += 1;
if (ai.array[1] < 0) r += 2;
if (ai.array[2] < 0) r += 4;
if (ai.array[3] < 0) r += 8;
return r;
}
}
----------------------------------------------------
Same remark for:
- _mm_movemask_epi8 (pmovmskb),
- _mm_movemask_pd (movmskpd),
--
More information about the Digitalmars-d-bugs
mailing list