// Shift operations
//-----------------------------------------------------------------------
SIMD_IWRAPPER_1I(slli_epi32); // return a << ImmT
+SIMD_IWRAPPER_1I(slli_epi64); // return a << ImmT
static SIMDINLINE Integer SIMDCALL sllv_epi32(Integer vA, Integer vB) // return a << b (uint32)
{
SIMD_IWRAPPER_1I(srli_epi32); // return a >> ImmT (uint32)
SIMD_IWRAPPER_1I_(srli_si, _mm_srli_si128); // return a >> (ImmT*8) (uint)
+static SIMDINLINE Integer SIMDCALL srl_epi64(Integer a, Integer n)
+{
+ return _mm_srl_epi64(a, n);
+}
+
template<int ImmT> // same as srli_si, but with Float cast to int
static SIMDINLINE Float SIMDCALL srlisi_ps(Float a)
{
return _mm_cvtepi32_ps(a);
}
+static SIMDINLINE int32_t SIMDCALL cvtsi128_si32(Integer a) // return a.v[0]
+{
+ return _mm_cvtsi128_si32(a);
+}
+
+static SIMDINLINE Integer SIMDCALL cvtsi32_si128(int32_t n) // return a[0] = n, a[1]...a[3] = 0
+{
+ return _mm_cvtsi32_si128(n);
+}
+
SIMD_IWRAPPER_1(cvtepu8_epi16); // return (int16)a (uint8 --> int16)
SIMD_IWRAPPER_1(cvtepu8_epi32); // return (int32)a (uint8 --> int32)
SIMD_IWRAPPER_1(cvtepu16_epi32); // return (int32)a (uint16 --> int32)